/* Jessy (Jiyoung) Yoon — personal site · C6
   serif titles: Newsreader · belief line: Instrument Serif · body: Instrument Sans + Pretendard
   handwriting note: Nothing You Could Do · highlight (butter yellow): #FFE27A, 2 spots only */

:root {
  --bg: #FBF7F0; --ink: #2A2623; --soft: #6E655D; --line: #E7DFD3; --hl: #FFE27A;
  --sans: "Instrument Sans", "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --serif: "Newsreader", "Pretendard Variable", Pretendard, serif;
  --sleek: "Instrument Serif", "Newsreader", "Pretendard Variable", serif;
  --hand: "Nothing You Could Do", cursive;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { word-break: keep-all; overflow-wrap: break-word; font-family: var(--sans); -webkit-font-smoothing: antialiased; }
p { margin: 0; }

.wrap { max-width: 640px; margin: 0 auto; padding-block: 36px 96px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* top nav */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 64px; font-size: 14px; color: var(--soft); }
.top nav { display: flex; flex-wrap: wrap; gap: 16px; }
.top a { color: var(--soft); text-decoration: none; }
.top a:hover { color: var(--ink); }

/* hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 28px; }
.photo { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: #F1EADF; flex: none; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.name { font-size: 15px; color: var(--soft); line-height: 1.5; }
.name strong { color: var(--ink); font-weight: 600; }
.note { font-family: var(--hand); font-size: 19px; color: #8A7E72; display: inline-block; transform: rotate(-3deg); margin-top: 4px; }

h1 { text-wrap: balance; font-family: var(--serif); font-optical-sizing: auto; font-weight: 500; font-size: 50px; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 28px; }
.lang { display: inline-block; font-size: 14px; color: var(--soft); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.lang:hover { color: var(--ink); border-color: var(--ink); }
h1 + .lang { margin: -12px 0 26px; }

.lead { font-size: 21px; line-height: 1.85; font-weight: 500; letter-spacing: -0.01em; }
.body { font-size: 17.5px; line-height: 1.9; letter-spacing: -0.005em; }

/* links & accents */
a.in { color: var(--ink); text-decoration: underline; text-decoration-color: #CBBFAF; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a.in:hover { background: linear-gradient(transparent 60%, var(--hl) 60%); text-decoration-color: var(--ink); }
.hl { background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 92%, transparent 92%); padding: 0 2px; }
.em { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.08em; letter-spacing: 0; }

/* video / still */
.film { margin: 44px 0 0; }
.film img, .film video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #E9E1D5; }

/* story */
.story { margin-top: 44px; }
.story { display: grid; gap: 30px; }
.chapter { display: grid; gap: 4px; }
.when { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--soft); font-variant-numeric: tabular-nums; }

/* sections */
.label { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); margin-bottom: 16px; }
.why { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.why p + p { margin-top: 18px; }
.why .belief { font-family: var(--sleek); font-weight: 400; font-size: 36px; line-height: 1.22; letter-spacing: -0.01em; margin-bottom: 28px; }
.why .lead2 { font-size: 17.5px; line-height: 1.9; letter-spacing: -0.005em; }
.block { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }

/* photo grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid figure { margin: 0; }
.grid img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; background: #E9E1D5; }
.grid figcaption { margin-top: 6px; font-size: 12px; color: var(--soft); }

/* writing */
.sub { font-size: 13px; color: var(--soft); margin: 22px 0 4px; }
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16.5px; line-height: 1.6; }
.posts li:last-child { border-bottom: none; }
.posts .meta { display: block; font-size: 12.5px; color: var(--soft); margin-top: 2px; }

/* p.s. */
.ps { margin-top: 64px; position: relative; }
.ps .body { font-size: 18px; }
.cta { display: inline-block; margin-top: 18px; padding: 12px 20px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.arrow { color: #8A7E72; position: absolute; left: -54px; top: 58px; width: 46px; height: 34px; }

/* ===== Korean page (ko.html) ===== */
html:lang(ko) {
  --sans: "Pretendard Variable", Pretendard, "Instrument Sans", system-ui, sans-serif;
  --serif: "Newsreader", "Noto Serif KR", serif;
  --sleek: "Instrument Serif", "Noto Serif KR", serif;
}
html:lang(ko) h1 { font-size: 42px; line-height: 1.3; letter-spacing: -0.03em; }
html:lang(ko) .label { font-style: normal; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
html:lang(ko) .why .belief { font-weight: 300; font-size: 29px; line-height: 1.55; letter-spacing: -0.03em; }
html:lang(ko) .em { font-style: italic; }
html:lang(ko) .when { font-size: 14px; }

@media (max-width: 760px) { .arrow { display: none; } }
@media (max-width: 480px) {
  .wrap { padding-block: 24px 72px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .top { margin-bottom: 44px; }
  .top nav { gap: 13px; }
  h1 { font-size: 40px; }
  .lead { font-size: 18.5px; }
  .body { font-size: 16.5px; }
  .label { font-size: 20px; }
  .why .belief { font-size: 29px; }
  .why .lead2 { font-size: 16.5px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .posts li { font-size: 15.5px; }
  html:lang(ko) h1 { font-size: 28px; }
  html:lang(ko) .label { font-size: 18px; }
  html:lang(ko) .why .belief { font-size: 23px; }
}

/* emphasis lines in my superpower / why */
.why .pull { font-family: var(--sleek); font-size: 28px; line-height: 1.3; letter-spacing: -0.01em; margin-block: 28px; }
.why .closing { font-family: var(--sleek); font-size: 30px; line-height: 1.28; letter-spacing: -0.01em; margin-top: 36px; }
html:lang(ko) .why .pull { font-weight: 300; font-size: 23px; line-height: 1.55; letter-spacing: -0.03em; }
html:lang(ko) .why .closing { font-weight: 300; font-size: 25px; line-height: 1.55; letter-spacing: -0.03em; }
@media (max-width: 480px) {
  .why .pull { font-size: 24px; }
  .why .closing { font-size: 25px; }
  html:lang(ko) .why .pull { font-size: 20px; }
  html:lang(ko) .why .closing { font-size: 21px; }
}

/* tl;dr + see more */
.tldr { display: grid; gap: 4px; margin-top: 44px; }
.tldr .body + .body { margin-top: 14px; }
.more { margin-top: 18px; }
.more summary { display: inline-block; list-style: none; cursor: pointer; font-size: 14px; color: var(--soft); border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.more summary::-webkit-details-marker { display: none; }
.more summary:hover { color: var(--ink); border-color: var(--ink); }
.more summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.more summary .closed::after { content: " ↓"; }
.more summary .opened::after { content: " ↑"; }
.more summary .opened, .more[open] summary .closed { display: none; }
.more[open] summary .opened { display: inline; }
.more .story { margin-top: 30px; }

/* link preview bubble */
.bubble { position: fixed; z-index: 50; width: min(300px, calc(100vw - 24px)); padding: 12px 14px; background: #FFFDF9; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(42, 38, 35, .14); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease; word-break: keep-all; overflow-wrap: break-word; }
.bubble.below { transform: translateY(-4px); }
.bubble.on { opacity: 1; transform: none; }
.bubble::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: #FFFDF9; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.bubble.below::after { bottom: auto; top: -6px; border: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.bubble-src { font-size: 11.5px; color: var(--soft); }
.bubble-title { margin-top: 3px; font-family: var(--serif); font-size: 16px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.bubble-text { margin-top: 5px; font-size: 13px; line-height: 1.5; color: var(--soft); }
@media (prefers-reduced-motion: reduce) { .bubble, .bubble.below { transition: none; transform: none; } }
