/* 색과 간격을 한곳에서 관리합니다. 화면 전체는 흑백과 회색만 사용합니다. */
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #151515;
  --muted: #656565;
  --line: #dedede;
  --soft: #f5f5f5;
  --max-width: 1120px;
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.7; -webkit-font-smoothing: antialiased; word-break: keep-all; }
::selection { color: #fff; background: #202020; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
img { display: block; max-width: 100%; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(var(--max-width), calc(100% - 96px)); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .065em; line-height: 1.6; }
.muted { color: var(--muted); }
.period { color: #777; }
.skip-link { position: absolute; left: 24px; top: -100px; z-index: 10; background: var(--ink); color: white; padding: 12px 18px; }
.skip-link:focus { top: 12px; }

/* 상단 메뉴 */
.site-header { min-height: 96px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2rem; border-bottom: 1px solid var(--ink); }
.wordmark { font-size: 1.55rem; letter-spacing: -.06em; font-weight: 750; line-height: 1; padding-block: .5rem; }
.wordmark span { margin-left: .03em; }
nav { display: flex; flex-wrap: wrap; gap: 2rem; font-size: .875rem; }
nav a { padding: 10px 0; color: #555; transition: color .18s; }
nav a:hover { color: #000; text-decoration: underline; text-underline-offset: 6px; }
nav a:last-child { color: var(--ink); }
nav a span { margin-left: 8px; }

/* 첫 화면: 글과 이미지는 grid의 두 열로 나란히 배치합니다. */
.hero-topline { display: flex; justify-content: space-between; gap: 1rem; padding-top: 25px; color: var(--muted); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 460px; align-items: center; gap: 64px; padding: 64px 0 70px; }
.eyebrow { display: flex; align-items: center; gap: 9px; font-size: .875rem; color: var(--muted); }
.dot { width: 6px; height: 6px; background: var(--ink); border-radius: 50%; flex-shrink: 0; }
h1 { margin: 22px 0 26px; font-size: clamp(5rem, 8.8vw, 7.3rem); font-weight: 600; letter-spacing: -.085em; line-height: .88; }
.hero-second { display: block; }
.hero-korean { font-size: 1.65rem; font-weight: 600; letter-spacing: -.055em; line-height: 1.55; }
.hero-description { margin-top: 20px; color: var(--muted); line-height: 1.85; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; margin-top: 30px; font-size: .875rem; }
.button { display: inline-flex; min-height: 48px; padding: 12px 20px; justify-content: space-between; align-items: center; gap: 30px; border: 1px solid var(--ink); transition: background .18s, color .18s; }
.button-dark { background: var(--ink); color: #fff; }
.button-dark:focus-visible { outline-color: var(--ink); }
.button-dark:hover { background: #fff; color: var(--ink); }
.button span, .text-link span { font-size: 1.1rem; }
.text-link { padding-block: 12px; }
.text-link span { margin-left: 8px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 6px; }
/* 선으로 그린 원자 궤도는 SVG, 원본 프로필은 가운데 HTML 이미지입니다. */
.atom-profile { min-width: 0; padding-top: 12px; }
.atom-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; }
.atom-orbits { position: absolute; inset: 0; width: 100%; height: 100%; animation: orbit-turn 90s linear infinite; }
.orbit-guide { opacity: .53; }
.atom-nucleus { position: absolute; top: 50%; left: 50%; width: 32%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid var(--ink); border-radius: 50%; padding: 6px; background: white; }
.atom-nucleus img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.atom-language { position: absolute; z-index: 1; background: var(--paper); border: 1px solid var(--line); padding: 5px 10px; font-size: .8125rem; letter-spacing: -.02em; }
.atom-ts { right: 0; top: 23%; }
.atom-py { left: 0; top: 24%; }
.atom-js { left: 34%; bottom: 4%; }
.atom-profile figcaption { display: flex; justify-content: space-between; gap: 12px; margin: 16px 16px 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; letter-spacing: .015em; }
.atom-profile figcaption > span:first-child { color: var(--ink); }
@keyframes orbit-turn { to { transform: rotate(360deg); } }
.hero-bottom { border-top: 1px solid var(--ink); padding-block: 20px; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); }
.hero-bottom a { display: inline-flex; align-items: center; gap: 20px; }
.hero-bottom a:hover { color: var(--ink); }

/* 공통 구역: 왼쪽은 구역 번호, 오른쪽은 실제 내용입니다. */
.section { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 50px; padding-block: 96px; border-bottom: 1px solid var(--line); }
.section-label { display: flex; align-items: flex-start; gap: 20px; color: var(--muted); padding-top: 9px; }
.section-label > span { color: var(--ink); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.5; letter-spacing: -.06em; font-weight: 600; }
.about-copy { max-width: 610px; margin-top: 25px; color: var(--muted); font-size: 1.0625rem; line-height: 1.9; }
.toolkit { margin-top: 43px; }
.toolkit > .eyebrow { font-size: .75rem; }
.language-list { display: flex; flex-wrap: wrap; gap: 16px 28px; list-style: none; padding: 0; margin: 19px 0 13px; }
.language-list li { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 550; }
.language-mark { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #333; font-size: .75rem; font-weight: 600; letter-spacing: -.02em; }
.toolkit-note { color: var(--muted); font-size: .875rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; }
.small-label { color: var(--muted); font-size: .75rem; }
.section-intro { margin-top: 16px; color: var(--muted); }
.projects { padding-bottom: 108px; border-bottom: none; }
.private-projects { display: flex; align-items: center; gap: 23px; margin-top: 35px; padding: 30px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.lock-icon { width: 24px; height: 24px; flex-shrink: 0; color: var(--muted); }
.private-projects h3 { font-size: 1rem; font-weight: 600; }
.private-projects p { margin-top: 5px; color: var(--muted); font-size: .875rem; }
.private-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; margin-left: auto; background: var(--ink); }

/* 연락처는 검정 배경으로 마지막 화면에 무게를 줍니다. */
.contact { background: var(--ink); color: #fff; }
.contact-inner { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 50px; padding-block: 75px 58px; }
.contact .section-label, .contact .eyebrow { color: #b9b9b9; }
.contact .section-label > span { color: #fff; }
.contact .eyebrow { font-size: .75rem; margin-bottom: 17px; }
.contact h2 { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.contact h2 > span { font-size: 3.3rem; font-weight: 400; line-height: 1; }
.contact-description { margin-top: 17px; color: #b9b9b9; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; border-bottom: 1px solid #666; padding-bottom: 15px; }
.email-link { font-size: clamp(1.1rem, 2.1vw, 1.65rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.email-link:hover { text-decoration: underline; text-underline-offset: 6px; }
.copy-button { display: inline-flex; align-items: center; gap: 20px; background: transparent; color: white; border: 1px solid #777; min-height: 44px; padding: 8px 13px; font-size: .875rem; transition: background .18s, color .18s; }
.copy-button:hover { background: white; color: var(--ink); }
.copy-button:disabled { cursor: wait; }
.copy-status { min-height: 1.7em; margin-top: 10px; color: #c4c4c4; font-size: .875rem; }
.site-footer { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 24px; color: var(--muted); font-size: .875rem; }
.site-footer .mono { font-size: .75rem; }
.site-footer a { color: var(--ink); padding-block: 8px; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.site-footer a span { margin-left: 10px; }

/* 태블릿과 모바일에서는 열 수와 여백을 줄여 가로 스크롤을 막습니다. */
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 64px); }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; padding-block: 60px; }
  h1 { font-size: clamp(4.7rem, 9.3vw, 6.4rem); }
  .section, .contact-inner { grid-template-columns: 145px minmax(0, 1fr); gap: 32px; }
  .language-list { gap: 16px 22px; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 80px; gap: 10px 20px; padding-block: 18px; }
  .wordmark { font-size: 1.25rem; flex-shrink: 0; }
  nav { gap: 16px; }
  nav a span { margin-left: 3px; }
  .hero-topline { padding-top: 21px; font-size: .75rem; flex-wrap: wrap; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 47px 0 45px; }
  h1 { font-size: clamp(4.7rem, 19vw, 7.3rem); margin-top: 24px; margin-bottom: 28px; }
  .hero-korean { font-size: 1.5rem; }
  .hero-description { margin-top: 16px; }
  .hero-actions { gap: 20px; margin-top: 26px; }
  .atom-profile { width: min(100%, 400px); padding-top: 0; justify-self: center; }
  .atom-profile figcaption { margin-inline: 0; flex-wrap: wrap; }
  .hero-bottom { font-size: .75rem; padding-block: 19px; }
  .hero-bottom > span { max-width: 220px; }
  .hero-bottom > a { font-size: 0; gap: 0; }
  .hero-bottom > a span { font-size: 1.2rem; padding-inline: 12px; }
  .section { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: 61px; }
  .section-label { padding-top: 0; }
  h2 { font-size: 1.9rem; }
  .about-copy { font-size: 1rem; margin-top: 22px; }
  .toolkit { margin-top: 31px; }
  .language-list { column-gap: 22px; }
  .private-projects { gap: 15px; padding-block: 25px; }
  .private-projects p { max-width: 280px; }
  .contact-inner { grid-template-columns: minmax(0, 1fr); gap: 31px; padding-block: 43px 30px; }
  .contact h2 { font-size: 1.8rem; gap: 8px; }
  .contact h2 > span { font-size: 2.3rem; }
  .contact-description { font-size: .9375rem; }
  .email-row { margin-top: 26px; }
  .email-link { font-size: 1.35rem; }
  .site-footer { flex-wrap: wrap; column-gap: 24px; row-gap: 12px; padding-block: 20px; }
  .site-footer > .mono { order: 3; width: 100%; font-size: .75rem; }
}

/* 움직임 감소 설정을 사용하면 부드러운 스크롤과 전환을 끕니다. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
