:root {
  --bg: #fcfcfc;
  --fg: #4a4a4a;
  --strong: #1e1e1e;
  --muted: #8a8a8a;
  --line: #e6e6e6;
  --accent: #1f6feb;
  --display: Jost, Pretendard, "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }

/* Reserve the scrollbar so pages of different length line up (no sideways jump between pages) */
html { scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.9 Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px 64px; }

a { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: currentColor; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--strong); line-height: 1.3; }
h4 { margin: 20px 0 4px; font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* 미디어가 화면 폭을 넘지 않게 (모바일 가로 스크롤 방지) */
img, video { display: block; max-width: 100%; height: auto; }
iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
pre, table { display: block; overflow-x: auto; }

/* Header */
.site-header { padding: 40px 0 0; margin-bottom: 64px; }
.find-me { margin: 0 0 8px; text-align: right; font-family: var(--display); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.find-me .icon-link { margin-left: 16px; }
.find-me .icon svg, .find-me .icon { width: 18px; height: 18px; }
.site-name {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.6rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--strong);
  border: 0;
}
nav { display: flex; flex-wrap: wrap; gap: 8px 40px; margin-top: 24px; }
nav a {
  font-family: var(--display);
  font-size: .9rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 0;
}
nav a:hover, nav a.active { color: var(--strong); }

/* Portfolio sub menu: project names under the main nav */
.sub-nav { gap: 6px 28px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sub-nav a { font-size: .78rem; letter-spacing: .12em; border-bottom: 1px solid transparent; }
.sub-nav a.active { border-bottom-color: var(--strong); }

/* Section titles: thin uppercase, like "ABOUT" */
.section-title, main > h1 {
  margin: 0 0 32px;
  font-size: 2.1rem;
  font-weight: 300;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.section-title:not(:first-child) { margin-top: 96px; }
.sub-title { margin: 40px 0 8px; font-size: 1rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
main > h2 { margin-top: 48px; font-weight: 500; }

/* About */
.about { display: grid; grid-template-columns: 180px 1fr; gap: 48px; align-items: start; }
.avatar { width: 100%; aspect-ratio: 1; object-fit: cover; }
.intro p { margin: 0 0 20px; }
.about-text { padding-left: 34px; font-size: .88rem; line-height: 1.85; color: var(--fg); }
.contact { list-style: none; padding: 0; margin: 0; }

/* Overview list (About) */
.overview-item { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: center; padding: 24px 0; color: var(--fg); font-weight: 400; border: 0; border-top: 1px solid var(--line); }
.overview-item:last-child { border-bottom: 1px solid var(--line); }
.overview-item h3 { margin: 0 0 4px; font-size: 1.3rem; font-weight: 500; }
.overview-item:hover h3 { color: var(--accent); }
.overview-item p { margin: 0; }

/* Project block (Portfolio, detail page) */
.project { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 48px 0; border-top: 1px solid var(--line); }
.section-title + .project { border-top: 0; padding-top: 0; }
.project h2 { margin: 0 0 8px; font-size: 1.7rem; font-weight: 500; }
.year, .muted { color: var(--muted); font-weight: 400; }
.summary { color: var(--strong); font-weight: 600; margin: 0 0 16px; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 2px 20px; margin: 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; color: var(--strong); }
.project ul { padding-left: 1.2em; margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 20px; }

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 24px;
  border: 1px solid var(--strong);
  color: var(--strong);
  font-family: var(--display);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.button:hover { background: var(--strong); color: var(--bg); }
.button.small { margin: 0; padding: 5px 12px; font-size: .7rem; letter-spacing: .12em; }
/* Page title with an action on the right (RESUME + PDF download) */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 32px; }
.page-head .section-title { margin: 0; }

.project h2 a { color: var(--strong); font-weight: 500; }
.project-cover { border: 0; }

/* Project detail page */
.project-title { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 500; }
.tagline { margin: 0 0 16px; font-size: 1.15rem; color: var(--strong); }
.highlights { padding-left: 1.2em; margin: 0 0 16px; }
.detail-cover { margin: 32px 0 0; }
.project-detail > h2, .content h2 { margin: 64px 0 20px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 1.5rem; font-weight: 500; }
.content h3 { margin: 48px 0 0; font-size: 1.1rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.content h4 { margin: 40px 0 12px; font-size: 1.2rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--strong); }
.content ul, .content ol { padding-left: 1.3em; }
.content li > ul, .content li > ol { margin: 2px 0 6px; }
.content strong { color: var(--strong); }
.content img { margin: 20px 0; border: 1px solid var(--line); }
.content table { border-collapse: collapse; margin: 20px 0; font-size: .92rem; line-height: 1.6; }
.content th, .content td { padding: 8px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.content th { background: #f2f2f2; color: var(--strong); font-weight: 600; }
code { padding: 1px 5px; border-radius: 3px; background: #efefef; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; color: var(--strong); }
pre { padding: 16px 20px; border-radius: 4px; background: #f3f3f3; font-size: .85rem; line-height: 1.6; }
pre code { padding: 0; background: none; font-size: inherit; }
details { margin: 16px 0; padding: 12px 18px; border: 1px solid var(--line); border-radius: 4px; }
summary { cursor: pointer; font-weight: 600; color: var(--strong); }

footer { margin-top: 96px; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-align: center; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px 48px; }
  .site-header { margin-bottom: 40px; }
  nav { gap: 8px 24px; }
  .find-me { text-align: left; }
  .find-me .icon-link { margin: 0 16px 0 0; }
  .about, .project, .overview-item { grid-template-columns: 1fr; gap: 20px; }
  .avatar { max-width: 140px; }
  .section-title:not(:first-child) { margin-top: 64px; }
}

/* Resume */
blockquote { margin: 16px 0; padding-left: 20px; border-left: 2px solid var(--line); color: var(--strong); }
/* Slogan (ABOUT, RESUME): heavy light-gray quote marks on both sides, regular weight */
.slogan { position: relative; margin: 0 0 20px; padding: 0 0 0 34px; border: 0; font-weight: 400; line-height: 1.8; color: var(--strong); }
.resume-head .slogan { margin: 14px 0 0; }
.resume-portfolio { margin: 10px 0 0 34px; }
.about .slogan { font-family: "Noto Serif KR", Georgia, serif; font-size: 1.2rem; }
.slogan::before,
.slogan::after { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 2.8rem; color: #cfcfcf; }
.slogan::before { content: "\201C"; position: absolute; left: 0; top: -.1em; line-height: 1; }
.slogan::after { content: "\201D"; display: inline-block; margin-left: 6px; line-height: 0; vertical-align: -.42em; }
.resume-head { display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; align-items: start; margin-top: 32px; }
.resume-head h2 { margin: 0; font-size: 2.1rem; font-weight: 500; }
.resume-head .contact { padding-top: 6px; text-align: right; }
/* Resume contacts: Korean labels, plain black text */
.resume-head .contact { padding-top: 8px; font-size: .74rem; line-height: 1.9; color: var(--strong); text-align: left; }
.resume-head .contact li { display: flex; align-items: center; gap: 6px; margin: 0; }
.resume-head .contact .icon { width: 13px; height: 13px; flex: none; }
.resume-head .contact a { color: var(--strong); font-weight: 400; }
.resume-head .contact a:hover { border-bottom-color: currentColor; }
/* Light divider above each resume section (프로젝트, 기술 스택, 학력, 자격증) */
main > h2 { padding-top: 28px; border-top: 1px solid var(--line); }
.resume-head .muted { margin: 0; }
/* Private build only (JEKYLL_ENV=private): ID photo before the name */
.resume-head.with-photo { grid-template-columns: auto 1fr auto; }
.resume-photo { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); }
main > h3 { margin: 48px 0 4px; font-size: 1.35rem; font-weight: 500; }
main > h3 + p { margin: 0 0 4px; color: var(--strong); }
main > p.muted { margin: 0 0 8px; }

/* Print (resume.pdf is generated from /resume/ with these rules) */
@media print {
  li, p { break-inside: avoid; }
  @page { margin: 14mm 16mm; }
  body { font-size: 10.5pt; line-height: 1.6; background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .site-header, footer, .button, main > h1, .page-head { display: none; }
  .resume-head { margin-top: 0; }
  .resume-head { column-gap: 20px; }
  .resume-head .slogan { padding-left: 28px; font-size: 9pt; }
  .resume-portfolio { margin-left: 28px; }
  .resume-head .slogan::before, .resume-head .slogan::after { font-size: 2.2rem; }
  .resume-head .contact { white-space: nowrap; }
  main > h2 { border-top-color: #e3e3e3; }
  a { color: inherit; font-weight: inherit; }
  h2, h3, h4 { break-after: avoid; }
}

/* Images inside project write-ups */
.content img.phone { max-width: 320px; }
.caption { margin: -8px 0 28px; font-size: .85rem; color: var(--muted); }
.detail-cover { image-rendering: auto; }
.overview-item img, .project-cover img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* Links: icon + small label */
.icon-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display), Pretendard, sans-serif; font-size: .8rem; font-weight: 500; letter-spacing: .04em; color: var(--accent); border: 0; vertical-align: middle; }
.icon-link:hover { color: #0b4fb3; }
.icon-link .icon { flex: none; }
.contact li { margin: 2px 0; }

/* Detail page image gallery (2 columns, click opens the original) */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; max-width: 880px; margin: 32px 0 0; }
.gallery figure { margin: 0; }
.gallery a { display: block; border: 0; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--line); }
.gallery figcaption { margin-top: 6px; font-size: .82rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr; } }

@media screen and (max-width: 760px) {
  .resume-head { grid-template-columns: 1fr; }
  .resume-head .contact { padding-top: 0; text-align: left; }
}

/* Explicit list thumbnail (front matter `thumb`): whole image, pixel art kept crisp */
.overview-item img.thumb, .project-cover img.thumb { object-fit: contain; background: #fff; border: 1px solid var(--line); image-rendering: pixelated; }
/* Before/after pair inside a write-up: full width, no crop */
.content .gallery.compare { max-width: none; margin: 24px 0; }
.content .gallery.compare img { aspect-ratio: auto; object-fit: initial; margin: 0; }

/* Autoplay clips (front matter `clip`, or {% include video.html %} in a write-up) */
video.clip { display: block; width: 100%; max-width: 880px; height: auto; margin: 32px 0 0; background: #000; }
.content video.clip { margin: 20px 0; }
.detail-cover.phone, video.clip.phone { max-width: 320px; }
/* PORTFOLIO card: clip fills the 16:10 box, a vertical clip is shown whole with dark side bars */
.project-cover video.clip { margin: 0; max-width: none; aspect-ratio: 16 / 10; object-fit: contain; background: #1a1a1a; }
.avatar-wrap { margin: 0; }
.nickname { margin-top: 8px; text-align: center; font-family: var(--display); font-size: .8rem; letter-spacing: .14em; color: var(--muted); }
@media (max-width: 760px) { .avatar-wrap { max-width: 140px; } }

/* Header: small CONTACT label before the icons */
.find-me-label { margin-right: 2px; font-size: .7rem; letter-spacing: .16em; color: var(--muted); vertical-align: middle; }

/* ABOUT: Projects | Blog side by side */
.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 80px; align-items: start; }
.home-columns .section-title { margin: 0 0 16px; font-size: 1.4rem; }
.home-columns .overview { padding-top: 0; }
.home-columns .overview-item, .blog-item { grid-template-columns: 96px 1fr; gap: 14px; align-items: start; padding: 12px 0; }
.home-columns .overview-item h3, .blog-item h3 { margin: 0 0 2px; font-size: .9rem; font-weight: 500; line-height: 1.45; }
.home-columns .overview-item p, .blog-item p { margin: 0; font-size: .78rem; line-height: 1.55; }
.home-columns .overview-item p:not(.muted), .blog-item p:not(.muted) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-columns .muted, .blog-item .muted { font-size: .72rem; }
.blog-item { display: grid; color: var(--fg); font-weight: 400; border: 0; border-top: 1px solid var(--line); }
.blog-item:last-of-type { border-bottom: 1px solid var(--line); }
.blog-item:hover { border-bottom-color: var(--line); }
.blog-item:hover h3 { color: var(--accent); }
.blog-item h3 { font-family: Pretendard, sans-serif; color: var(--strong); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-item img, .blog-thumb-empty { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--line); }
.blog-thumb-empty { display: block; background: #f2f2f2; }
.blog-more { margin: 16px 0 0; text-align: right; }
/* Both columns share the same row tracks, so item N on the left lines up with item N on the right */
.home-columns { row-gap: 0; }
.home-columns > section { display: grid; grid-template-rows: subgrid; grid-row: span var(--rows); }
@media (max-width: 760px) { .home-columns { grid-template-columns: 1fr; gap: 56px; } .home-columns > section { display: block; grid-row: auto; } }
@media (max-width: 760px) { .home-columns { margin-top: 64px; } .home-columns .overview-item, .blog-item { grid-template-columns: 88px 1fr; } }

/* Tech-stack chips: light gray, text only, flow on the same line as surrounding text */
.chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; vertical-align: middle; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #f0f0ef; color: var(--strong); font-family: Pretendard, sans-serif; font-size: .78rem; font-weight: 400; line-height: 1.7; white-space: nowrap; }
.chip-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-right: 10px; }
.chip-group-label { font-size: .74rem; color: var(--muted); }
.chip-more { padding: 0 2px; font-weight: 700; color: var(--muted); }
main > p.muted .chips { margin-left: 8px; }
main > ul .chips { margin-left: 8px; }
