:root {
  color-scheme: dark;
  --night: #101419;
  --ink: #232b31;
  --paper: #eee6d6;
  --moon: #f1e8d6;
  --gold: #d7b988;
  --line: #807158;
  --serif: "Noto Serif KR", "Nanum Myeongjo", Batang, "AppleMyungjo", Georgia, serif;
  --sans: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); }
body { margin: 0; color: var(--moon); font-family: var(--sans); }
a { color: inherit; text-underline-offset: .28em; }
button, select, input, textarea { font: inherit; }
button, select { cursor: pointer; }
button, input, select, textarea { color: inherit; }
a:focus-visible, button:focus-visible, :is(input, textarea, select):focus-visible {
  outline: 2px solid #c77b46; outline-offset: 4px;
}
[hidden] { display: none !important; }
h1, h2, h3, p, figure, ul, dl, dd { margin: 0; }
img, video { display: block; max-width: 100%; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; overflow: hidden; clip-path: inset(50%); width: 1px; height: 1px;
  white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 10; padding: .8rem; background: var(--paper); color: var(--ink); }

.site { width: min(100% - 8vw, 1510px); margin: 0 auto; }
.masthead { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.signature { display: inline-flex; align-items: center; gap: 15px; flex-shrink: 0; text-decoration: none; }
.signature > span:last-child { font: bold 1rem Georgia, serif; letter-spacing: .22em; }
.seal {
  display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #cf8d73;
  color: #f3c9ae; background: #582f2a; box-shadow: inset 0 0 0 3px #222326;
  font: 700 1.25rem/1 var(--serif); transform: rotate(-4deg);
}
.chapter-nav { display: flex; gap: clamp(1rem, 2.6vw, 2.7rem); }
.chapter-nav a { color: #c8c5b9; text-decoration: none; padding: .7rem 0; font-size: .88rem; white-space: nowrap; }
.chapter-nav a[aria-current], .chapter-nav a:hover { color: #ffdfac; }
.chapter-nav a[aria-current] { box-shadow: 0 1px var(--gold); }
.mobile-index { display: none; }
.mobile-index select { min-height: 40px; padding: .25rem .55rem; border: 1px solid #6a5e4d; border-radius: 0; background: #20262c; font-size: .94rem; }

.book {
  position: relative; isolation: isolate; outline: none; border: 1px solid #73654f;
  background: #151d24; box-shadow: 0 5px 0 -2px #1a1c1d, 0 6px 0 -2px #5e5548, 0 9px 0 -3px #272524;
}
.reader .site { min-height: 330px; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.reader .book { align-self: center; width: 100%; height: 100%; max-height: 940px; overflow: hidden; perspective: 1650px; }
.page { position: relative; min-width: 0; }
.reader .page { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; }
.page:focus { outline: none; }
.page[inert] { pointer-events: none; }
.cover {
  min-height: 100%; display: grid; isolation: isolate;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.13fr);
  align-items: center; column-gap: clamp(2rem, 5.5vw, 6.5rem);
  padding: clamp(3rem, 6.5vw, 7.5rem);
  background: #151c25;
  background-image: radial-gradient(ellipse at 77% 42%, #303a4b 0%, #1c2633 35%, transparent 73%),
    linear-gradient(125deg, #12191e, #222329);
}
.cover::before, .cover::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
/* Static window lattice, drawn with CSS rules. */
.cover::before {
  inset: 20px;
  background:
    linear-gradient(90deg, transparent 49.8%, #c6aa742c 50%, transparent 50.2%),
    repeating-linear-gradient(90deg, #cab1801f 0 1px, transparent 1px 16px) top / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, #cab1801f 0 1px, transparent 1px 16px) bottom / 100% 12px no-repeat;
}
.cover::after { inset: 20px; border: 1px solid #cab18052; }
.cover-copy { min-width: 0; container-type: inline-size; }
.rubric { color: #70513b; font: 600 .79rem/1.45 var(--sans); letter-spacing: .18em; }
.cover .rubric { color: #ead0a5; font: .83rem/1.45 Georgia, serif; margin-bottom: clamp(1.1rem, 3.1vh, 2.4rem); }
.cover h1, .chapter-title h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.075em; line-height: 1.16; }
.cover h1 { font-size: clamp(2.2rem, 5.5vw, 6rem); }
.cover h1 span, .cover h1 strong { display: block; }
.cover h1 span { font-size: .57em; color: #e6d6be; margin-bottom: .27em; font-weight: 500; }
.cover h1 strong { font-weight: 700; }
.cover-intro { max-width: 29em; margin-top: 1.45rem; font-size: clamp(1rem, 1.24vw, 1.19rem); color: #f1e7d4; line-height: 1.77; word-break: keep-all; }
.cover-actions, .text-links { display: flex; flex-wrap: wrap; gap: .75rem clamp(.85rem, 2vw, 1.7rem); align-items: center; }
.cover-actions { margin-top: clamp(1.15rem, 3vh, 2.5rem); }
.solid-button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 44px;
  padding: .62rem 1.03rem; border: 1px solid #262c30; background: #273036; color: #fff3dc;
  border-radius: 0; font-size: .94rem; font-weight: 600; text-decoration: none;
}
.solid-button:hover { background: #444c4c; }
.cover .solid-button { background: #f0e2c8; color: #292722; border-color: #f0e2c8; }
.cover .solid-button:hover { background: #fff3d8; }
.quiet-link { font-size: .93rem; color: #f0ddba; }
.cover .text-links { margin-top: clamp(.9rem, 3.2vh, 2.2rem); }
.text-links { color: #70513b; font: 600 .85rem/1.4 var(--sans); }
.cover .text-links { color: #ddd0ba; }
.text-links a:hover, .quiet-link:hover { color: #b77650; }
.cover-film { position: relative; width: 100%; max-width: 640px; justify-self: end; }
.cover-film::before, .cover-film::after {
  content: ""; position: absolute; pointer-events: none; z-index: -1; border: 1px solid #c4a77752; border-radius: 50%;
}
.cover-film::before { inset: -13% 9% -10%; transform: rotate(-20deg); }
.cover-film::after { inset: -8% 11% -4%; transform: rotate(23deg); border-style: dashed; }
.film-border {
  padding: 8px; border: 1px solid #ddbf8f; background: #10151fcc;
  box-shadow: 0 14px 26px #070a0e66, inset 0 0 0 3px #252b2d;
}
.film-border video { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #141429; }
.cover-film figcaption { display: flex; justify-content: space-between; align-items: center; min-height: 36px; margin-top: 9px; }
.cover-film figcaption a { color: #f2ddbb; font: italic 1rem Georgia,serif; letter-spacing: .14em; }
#film-toggle, .quiet-button {
  background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 0; padding: .3rem .55rem;
}
#film-toggle { min-width: 37px; min-height: 33px; color: #f2ddbb; }
#film-toggle:hover { background: #f2ddbb; color: #201d1b; }

.folio {
  color-scheme: light; color: var(--ink); background: var(--paper);
  background-image: radial-gradient(ellipse at top right, #fff7e78c, transparent 65%);
  padding: clamp(2rem, 5.8vh, 5.4rem) clamp(2rem, 6vw, 7rem);
}
.folio::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 7px;
  background: linear-gradient(90deg,#8773535e,#f7eada00); pointer-events: none;
}
.chapter-title { padding-bottom: clamp(.85rem, 2.5vh, 2rem); border-bottom: 1px solid #a1937e; margin-bottom: clamp(1.2rem, 3.3vh, 3rem); }
.chapter-title .rubric { margin-bottom: .48rem; color: #7b4b37; }
.chapter-title h2 { font-size: clamp(2rem, 4.25vw, 4.5rem); word-break: keep-all; }
.chapter-intro { font-size: 1rem; line-height: 1.72; color: #4c4e47; word-break: keep-all; }
.bio-spread,.record-spread,.work-spread,.contact-spread { display: grid; gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.bio-spread { grid-template-columns: minmax(140px,.68fr) minmax(0,1.85fr); }
.bio-portrait { max-width: 260px; }
.bio-portrait img { width: 100%; height: auto; aspect-ratio: .85; object-fit: contain; object-position: bottom; background: #d9cbb7; border: 1px solid #a9957e; }
.bio-portrait figcaption { display: flex; justify-content: space-between; gap: .4rem; margin-top: .55rem; font-size: .82rem; color: #574839; }
.bio-portrait figcaption span { font-family: Georgia, serif; font-style: italic; }
.bio-copy article { margin-top: .9rem; padding-top: .75rem; border-top: 1px solid #b9ad99; display: grid; grid-template-columns: 3.4rem minmax(0,1fr); gap: .8rem; }
.bio-copy h3, .stack dt, .timeline h3, .certifications h3 { font-weight: 700; font-size: 1rem; line-height: 1.55; }
.bio-copy article p, .work-detail > p:not(.rubric), .timeline p, .certifications li p { color: #494b43; font-size: 1rem; line-height: 1.65; word-break: keep-all; }
.document { display: inline-flex; gap: .7rem; align-items: baseline; margin-top: 1.1rem; font-size: .88rem; font-weight: 700; color: #604b39; }
.document small { font-size: .8rem; font-weight: 400; }
.stack { margin-top: 1.7rem; }
.stack > div { display: grid; grid-template-columns: minmax(8rem, .38fr) 1fr; gap: 1rem; border-top: 1px solid #a1937e; padding: clamp(.85rem, 2.55vh, 2rem) 0; }
.stack dd { line-height: 1.6; color: #494b43; }
.work-spread { grid-template-columns: minmax(12.5rem, .8fr) minmax(0, 1.6fr); gap: clamp(1.4rem, 4vw, 4.8rem); }
.project-list { display: grid; }
.project-list button {
  width: 100%; text-align: left; padding: .77rem .55rem .77rem .85rem; min-height: 43px;
  background: transparent; border: 0; border-bottom: 1px solid #ad9c85;
  font-size: .95rem; color: #3b3930; line-height: 1.35; word-break: keep-all;
}
.project-list button[aria-pressed="true"] { background: #ded0b7; color: #301e1b; font-weight: 700; box-shadow: inset 3px 0 #8e4a37; }
.project-list button:hover:not([aria-pressed="true"]) { background: #e4d8c4; }
.work-detail h3 { margin: .32rem 0 .63rem; font: 700 clamp(1.45rem, 2.8vw, 2.55rem)/1.28 var(--serif); letter-spacing: -.05em; }
.work-detail img { width: 100%; max-height: clamp(110px, 28vh, 360px); object-fit: cover; border: 1px solid #aa9680; margin-bottom: .75rem; }
.work-detail .technologies { margin-top: .7rem; color: #6e5140 !important; font-size: .87rem !important; }
.work-detail .text-links { margin-top: 1rem; }
.record-spread { grid-template-columns: minmax(0,1.6fr) minmax(0,.8fr); }
.timeline div,.certifications li { border-top: 1px solid #aa9d87; padding: .85rem 0; }
.timeline dt { font: .86rem/1.35 Georgia,serif; color: #74503c; margin-bottom: .38rem; }
.certifications ul { list-style: none; padding: 0; margin-top: .55rem; }
.contact-spread { grid-template-columns: minmax(0, .9fr) minmax(0,1.15fr); }
.email-address { display: inline-block; margin-top: .8rem; max-width: 100%; font: 600 clamp(.96rem, 1.72vw, 1.54rem)/1.3 Georgia,serif; overflow-wrap: anywhere; }
.quiet-button { display: block; margin-top: .6rem; min-height: 36px; color: #594230; font-size: .83rem; }
.quiet-button:hover { background: #e1d4bb; }
.copy-status { color: #5b5244; font-size: .83rem; }
.copy-status:not(:empty) { margin-top: .45rem; }
.contact-note .text-links { margin-top: 1.5rem; }
#email-form { display: grid; gap: .45rem; }
#email-form label { font-size: .91rem; font-weight: 700; }
#email-form input, #email-form textarea { width: 100%; padding: .55rem .6rem; background: #fff8eab3; border: 1px solid #9f927d; border-radius: 0; }
#email-form textarea { resize: vertical; min-height: 6.2rem; }
#email-form label[for="message"], .form-actions { margin-top: .45rem; }
.form-hint { color: #514b41; font-size: .88rem; line-height: 1.45; }

.book-footer { display: none; align-items: center; justify-content: space-between; gap: .8rem; min-height: 78px; padding-top: 6px; }
.reader .book-footer { display: flex; }
.location, .chapter-markers, .page-buttons { display: flex; align-items: center; }
.location { gap: 1.2rem; }
#chapter-name { color: #e7d8bf; font-size: .86rem; min-width: 3rem; }
.chapter-markers { gap: .1rem; }
.chapter-markers a { display: grid; place-items: center; width: 26px; height: 36px; }
.chapter-markers a::before { content: ""; width: 6px; height: 6px; border: 1px solid #b5a07e; transform: rotate(45deg); }
.chapter-markers a[aria-current]::before { background: #e9cda4; transform: rotate(45deg) scale(1.24); }
.page-buttons { gap: .55rem; }
.page-buttons button { min-height: 42px; padding: .32rem .72rem; color: #ebd9b8; background: none; border: 1px solid #645748; border-radius: 0; white-space: nowrap; font-size: .88rem; }
.page-buttons button:hover:not(:disabled) { background: #2c2f31; }
.page-buttons button:disabled { color: #9a9083; opacity: .64; cursor: default; }
html:not(.reader) .page { margin-bottom: 2px; }
@media (max-height: 740px) and (min-width: 761px) {
  .masthead { min-height: 61px; }
  .book-footer { min-height: 58px; }
  .cover { padding-block: 1.75rem; }
  .folio { padding-block: 1.45rem; }
  .chapter-title { margin-bottom: 1.05rem; }
}
@media (max-width: 850px) {
  .site { width: calc(100% - 34px); }
  .chapter-nav { gap: .85rem; }
  .cover { column-gap: 2rem; padding-inline: 2.4rem; }
  .cover h1 { font-size: clamp(2.1rem, 6.4vw, 5rem); }
  .folio { padding-inline: 1.9rem; }
}
@media (max-width: 760px) {
  .site { width: calc(100% - 22px); }
  .masthead { min-height: 58px; }
  .chapter-nav { display: none; }
  .mobile-index { display: block; }
  .cover { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: space-evenly; gap: 1.45rem; padding: 1.65rem 1.45rem;  }
  .cover::after { inset: 8px; }
  .cover::before { inset: 8px; background-size: 0, 100% 10px, 100% 10px; }
  .cover .rubric { margin-bottom: .65rem; }
  .cover h1 { font-size: clamp(2.25rem, 8.4vw, 4.35rem); }
  .cover-intro { margin-top: .75rem; font-size: 1rem; }
  .cover-actions { margin-top: .78rem; }
  .cover .text-links { margin-top: .87rem; }
  .cover-film { justify-self: center; max-width: min(450px, 42dvh * 1.65); }
  .film-border { padding: 4px; }
  .cover-film figcaption { min-height: 30px; margin-top: 5px; }
  .folio { padding: clamp(1.25rem,4vh,2.25rem) 1.2rem; }
  .chapter-title { margin-bottom: 1.25rem; }
  .bio-spread, .contact-spread, .record-spread { grid-template-columns: 1fr; gap: 1.35rem; }
  .bio-spread { display: flow-root; }
  .bio-portrait { width: 87px; float: right; margin: 0 0 .6rem .8rem; }
  .bio-portrait figcaption { display: none; }
  .bio-copy article { display: block; }
  .bio-copy article p { margin-top: .2rem; }
  .stack { margin-top: 1.15rem; }
  .stack > div { grid-template-columns: 1fr; gap: .2rem; }
  .work-spread { grid-template-columns: 1fr; gap: 1.1rem; }
  .project-list { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: .45rem; }
  .project-list button { font-size: .86rem; padding: .37rem .35rem .37rem .55rem; }
  .work-detail img { max-height: min(26vh,210px); }
  .record-spread { gap: 1rem; }
  .contact-note .text-links { margin-top: .85rem; }
  .book-footer { min-height: 57px; }
  .location { gap: .35rem; }
  #chapter-name { min-width: 0; font-size: .81rem; }
  .chapter-markers { display: none; }
}
@media (max-width: 360px) {
  .site { width: calc(100% - 16px); }
  .cover, .folio { padding-inline: 1rem; }
  .signature { gap: 9px; }
  .signature > span:last-child { font-size: .86rem; }
}
@media print {
  :root { color-scheme: light; }
  .reader .site, .reader .book { display: block; height: auto; max-height: none; overflow: visible; }
  .masthead, .reader .book-footer, .skip-link { display: none; }
  .reader .page { display: block !important; position: static; break-after: page; }
  .work-detail[hidden] { display: block !important; }
}


.page-leaving { z-index: 1; }
.skill-spread { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(190px,1fr); align-items: center; gap: 5vw; }
.orbit-study { position: relative; aspect-ratio: 1; width: 100%; max-width: 310px; justify-self: center; }
.orbit-study i { position: absolute; border: 1px solid #a19075; border-radius: 50%; inset: var(--orbit); }
.orbit-study i:nth-child(1) { --orbit: 3%; }
.orbit-study i:nth-child(2) { --orbit: 14%; }
.orbit-study i:nth-child(3) { --orbit: 25%; }
.orbit-study i:nth-child(4) { --orbit: 36%; }
.orbit-study i::before { position: absolute; content: ""; width: 8px; height: 8px; border-radius: 50%; background: #425c6b; }
.orbit-study i:nth-child(1)::before { top: 12%; left: 14%; background: #785b4b; }
.orbit-study i:nth-child(2)::before { top: 26%; right: 4%; }
.orbit-study i:nth-child(3)::before { bottom: 2%; right: 24%; background: #986e42; width: 11px; height: 11px; }
.orbit-study i:nth-child(4)::before { left: 2%; top: 25%; width: 6px; height: 6px; }
.orbit-study span { position: absolute; inset: 43%; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #ecd0a1, #9d5b36); }
@media (max-width: 860px) {
  .chapter-nav { display: none; }
  .mobile-index { display: block; }
}
@media (max-width: 580px) {
  .skill-spread { grid-template-columns: 1fr; }
  .orbit-study { display: none; }
}
html:not(.reader) .mobile-index, html:not(.reader) #film-toggle, html:not(.reader) .project-list, html:not(.reader) #email-form, html:not(.reader) #copy-email { display: none; }
html:not(.reader) .work-detail { margin-bottom: 1rem; }


@media (max-height: 510px) and (min-width: 650px) {
  .masthead, .book-footer { min-height: 52px; }
  .cover {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 1.75rem;
    padding: .85rem clamp(1.2rem, 4vw, 3rem);
  }
  .cover h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
  .cover .rubric { margin-bottom: .35rem; }
  .cover-intro { font-size: .92rem; line-height: 1.48; margin-top: .6rem; }
  .cover-actions, .cover .text-links { margin-top: .65rem; }
  .cover-film { max-width: min(100%, 55dvh * 1.60); }
}

@media (max-width: 425px) and (max-height: 690px) {
  .cover { padding-block: 1.05rem; gap: .66rem; align-content: center; }
  .cover h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .cover h1 span { margin-bottom: .16em; }
  .cover-intro { line-height: 1.52; }
  .cover .rubric, .cover-actions, .cover .text-links { margin-block: .5rem 0; }
  .cover .solid-button { min-height: 40px; }
  .cover-film { max-width: min(100%, 245px); }
  .cover-film figcaption { margin-top: 4px; }
}

.cover-identity {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: clamp(.65rem, 1.25vw, 1.4rem);
}
.cover-identity h1 {
  font-size: clamp(1.75rem,4.1vw,5rem);
  font-size: min(5rem, 11.3cqi);
  word-break: keep-all;
  overflow-wrap: normal;
}
.cover-portrait {
  position: relative;
  margin: 0 .35rem .45rem 0;
  width: clamp(64px, 6.5vw, 108px);
}
.cover-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: .88;
  object-fit: cover;
  object-position: center 40%;
  background: #222b36;
  border: 1px solid #9a886d;
  border-radius: 48% 48% 3px 3px;
}
.cover-sticker {
  position: absolute;
  right: -9%;
  bottom: -9%;
  width: 44%;
  height: auto;
  filter: drop-shadow(0 2px 3px #0009);
}
:is(.chapter-intro, .timeline p, .certifications p, .bio-copy article p, .work-detail p, .stack dd) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .cover-portrait { width: clamp(59px,16vw,82px); }
  .cover-actions { gap: .55rem 1rem; }
  .chapter-title h2 { overflow-wrap: anywhere; }
  .folio input, .folio textarea { font-size: 16px; }
}
@media (max-width: 355px) {
  .cover-portrait { width: 51px; }
  .cover-actions { gap: .55rem .7rem; }
}
