@font-face { font-family: Pretendard; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Pretendard-Regular.woff2") format("woff2"); }
@font-face { font-family: Pretendard; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Pretendard-Medium.woff2") format("woff2"); }
@font-face { font-family: Pretendard; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Pretendard-SemiBold.woff2") format("woff2"); }
/* Public pages: reference typography and spacing, with a system-driven palette. */
:root {
  color-scheme: light dark;
  --background: #fff;
  --background-edge: #fafafa;
  --foreground: #0d0d0d;
  --subtle: rgb(13 13 13 / 85%);
  --secondary: rgb(13 13 13 / 58%);
  --muted: #adadad;
  --border: #f0f0f0;
  --surface: #f3f3f3;
  --error: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #111;
    --background-edge: #0d0d0d;
    --foreground: #f2f2f2;
    --subtle: rgb(242 242 242 / 85%);
    --secondary: rgb(242 242 242 / 58%);
    --muted: #858585;
    --border: #262626;
    --surface: #1c1c1c;
    --error: #ff9690;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(var(--background), var(--background-edge));
  color: var(--foreground);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.011em;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { color: var(--background); background: var(--foreground); }
h1, h2, p, figure { margin: 0; }
h1, h2 { font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: -.008em; }
p { letter-spacing: -.008em; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { border: 0; background: transparent; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--secondary); outline-offset: 5px; border-radius: 2px; }
.hidden { display: none !important; }
.page-shell { width: 100%; max-width: 576px; margin: 0 auto; padding: 64px 24px; }
.eyebrow { color: var(--secondary); font-size: 13px; }
.profile { margin-top: 40px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.profile-name { display: flex; align-items: center; gap: 8px; margin-top: 32px; }
.profile-description { margin-top: 4px; color: var(--secondary); }
.social-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; color: var(--subtle); }
.social-link { transition: opacity .2s cubic-bezier(.4, 0, .2, 1); display: inline-flex; align-items: center; gap: 6px; }
.social-icon { width: 15px; height: 15px; flex-shrink: 0; }
.elegant-link, .social-link span, .story-body a:not(.story-video a) {
  background-image: linear-gradient(90deg, transparent 0%, var(--muted) 50%, transparent 100%);
  background-position: 0 100%; background-repeat: repeat-x; background-size: 4px 1px;
  transition: color .3s, background-position .3s;
}
.project-list { margin-top: 64px; }
.link-card { display: flex; align-items: center; padding: 12px 0; transition: opacity .2s; }
.project-content { display: flex; align-items: center; gap: 14px; min-width: 0; width: 100%; }
.project-icon { width: 48px; height: 48px; flex: 0 0 48px; object-fit: cover; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 1px #00000014, 0 2px 4px #00000009; }
.project-copy { min-width: 0; flex: 1; line-height: 1.35; }
.project-name { color: var(--subtle); font-weight: 500; }
.project-description { color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.writing-section { margin-top: 64px; }
.section-title { margin-bottom: 20px; }
#more-stories { margin: -10px 0; }
.writing-item { display: flex; align-items: baseline; gap: 16px; padding: 10px 0; transition: opacity .2s cubic-bezier(.4, 0, .2, 1); }
.writing-title { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.latest-story-dot { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 8px; height: 8px; margin-left: 10px; vertical-align: .08em; }
.latest-story-dot::before { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: #4ade80; content: ""; opacity: .75; animation: latest-story-ping 2s cubic-bezier(0,0,.2,1) infinite; }
.latest-story-dot > span { position: relative; display: block; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.writing-date { color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.list-message { padding: 10px 0; color: var(--secondary); }
.load-more { display: block; margin-top: 24px; color: var(--secondary); transition: color .2s; }
.newsletter { margin-top: 64px; }
.newsletter h2 { line-height: 1.25; }
.newsletter-description { margin-top: 16px; color: var(--subtle); }
.subscribe-box { position: relative; width: 100%; margin-top: 16px; }
.newsletter-input { display: block; width: 100%; min-width: 0; background: transparent; padding: 2px 28px 2px 0; border: 0; border-radius: 0; appearance: none; }
.newsletter-input:focus, .newsletter-input:focus-visible { outline: none; box-shadow: none; }
.newsletter-input::placeholder { color: var(--muted); opacity: 1; }
.subscribe-measure { position: absolute; visibility: hidden; pointer-events: none; white-space: pre; font: inherit; letter-spacing: inherit; }
.subscribe-button { position: absolute; top: 50%; left: min(calc(var(--email-width, 100px) + .45rem), calc(100% - 18px)); transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: var(--muted); transition: left .15s cubic-bezier(.4, 0, .2, 1), color .15s cubic-bezier(.4, 0, .2, 1); }
.subscribe-button:disabled { opacity: .5; }
.subscribe-button svg { display: block; flex-shrink: 0; }
.subscribe-message { margin-top: 12px; }
.is-success { color: var(--subtle); }
.is-error { color: var(--error); }
.site-footer { font-size: 13px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); color: var(--secondary); }
.back-link { display: inline-block; color: var(--subtle); }
.story { margin-top: 48px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; color: var(--muted); margin-bottom: 20px; }
.story-body { margin-top: 32px; color: var(--subtle); overflow-wrap: normal; word-break: normal; }
.story-body > * + * { margin-top: 20px; }
.story-body p, .story-body li { text-align: justify; text-align-last: start; -webkit-hyphens: none; hyphens: none; }
.story-body a { color: var(--foreground); }
.story-body strong { font-weight: 600; }
.story-body ul { padding-left: 20px; }
.story-body li + li { margin-top: 4px; }
.story-body li::marker { color: var(--secondary); }
.story-spacer { height: 24px; }
.story-code { background: var(--surface); padding: 16px; border-radius: 12px; overflow: auto; font-size: 13px; white-space: pre; }
.story-quote { margin-left: 0; margin-right: 0; padding: 16px; border-left: 2px solid var(--muted); background: var(--surface); }
.story-quote p { font-style: italic; }
.story-quote cite { color: var(--secondary); font-size: 13px; font-style: normal; }
.story-figure, .story-video { margin: 40px 0; }
.story-image { width: 100%; border-radius: 8px; }
.story-video > a { position: relative; display: block; overflow: hidden; border-radius: 12px; }
.story-video img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.story-video a > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.story-video a > span > span { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #000b; }
.story-video svg { width: 28px; height: 28px; margin-left: 4px; }
@media (hover: hover) {
  .social-links:hover .social-link { opacity: .4; }
  .social-links .social-link:hover { opacity: 1; }
  #link-cards:hover .link-card, #more-stories:hover .writing-item { opacity: .4; }
  #link-cards .link-card:hover, #more-stories .writing-item:hover { opacity: 1; }
  .elegant-link:hover, .social-link:hover span, .story-body a:not(.story-video a):hover {
    color: var(--foreground);
    background-image: linear-gradient(90deg, transparent 0%, var(--foreground) 50%, transparent 100%);
    animation: dash-move 1.5s linear infinite;
  }
  .load-more:hover, .subscribe-button:hover { color: var(--foreground); }
  .story-video a:hover img { opacity: .9; }
}
@keyframes dash-move { from { background-position: 0 100%; } to { background-position: 8px 100%; } }
@keyframes latest-story-ping { 75%, 100% { transform: scale(2); opacity: 0; } }
@media (max-width: 639px) {
  .newsletter-input, .subscribe-measure { font-size: 16px; }
  .writing-item { gap: 12px; }
}
@media (max-width: 380px) {
  .writing-item { flex-wrap: wrap; gap: 2px; }
  .writing-title { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* A small entrance movement, as on the reference pages. */
@media (prefers-reduced-motion: no-preference) {
  .profile, .story { animation: enter .65s .1s both; }
  .project-list, .writing-section { animation: enter .65s .2s both; }
  .newsletter, .site-footer { animation: enter .65s .4s both; }
}
@keyframes enter { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

/* Newsletter status pages use the same typography and spacing as the website. */
.status-page { margin-top: 40px; }
.status-description { margin-top: 16px; color: var(--subtle); }
.status-back { margin-top: 32px; }
