@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Sans+KR:wght@300;400;500;600;700;800&display=swap');

:root {
  --paper: #fff;
  --paper-soft: #fdfdfc;
  --ink: #303334;
  --ink-soft: #51585b;
  --secondary: #7b8184;
  --faint: #999fa2;
  --line: #dedfdf;
  --line-soft: #eceded;
  --blue: #5c7cae;
  --blue-pale: #dfe8fb;
  --coral: #d97980;
  --coral-pale: #fbe1df;
  --mint-pale: #def2e7;
  --mono: 'DM Mono', Consolas, monospace;
  --sans: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--sans); word-break: keep-all; }
::selection { background: var(--blue-pale); color: var(--ink); }
a { color: inherit; text-decoration: none; }
img { display: block; }
a, summary, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.section-shell { width: min(calc(100% - 88px), 1230px); margin-inline: auto; }

/* Minimal identity and navigation */
.site-header { position: sticky; top: 0; z-index: 50; height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 max(44px, calc((100vw - 1230px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 16px; white-space: nowrap; }
.brand-owner { font-size: 27px; font-weight: 700; letter-spacing: -.075em; line-height: 1; }
.brand-period { color: var(--coral); margin-left: 1px; }
.brand-detail { display: block; border-left: 1px solid #bfc4c6; padding-left: 14px; font: 500 10px/1.3 var(--mono); letter-spacing: .1em; color: #464c4e; }
.brand-detail small { display: block; padding-top: 3px; color: var(--secondary); font-size: 9px; letter-spacing: .12em; }
.header-nav { display: flex; gap: clamp(16px,2.2vw,32px); align-items: center; color: #747b7d; font-size: 12px; font-weight: 400; }
.header-nav a { padding: 14px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.header-nav a:hover, .header-nav a.active { color: var(--ink); border-bottom-color: var(--coral); }
.header-cta { flex: 0 0 auto; color: #353b3d; border-bottom: 1px solid var(--ink); padding: 9px 0 7px; font-size: 11px; font-weight: 500; }
.header-cta span { color: var(--coral); padding-left: 10px; font-size: 15px; }
.header-cta:hover { color: var(--blue); border-color: var(--blue); }

/* Spacious opening */
.hero { display: grid; grid-template-columns: minmax(340px,.86fr) minmax(0,1.14fr); align-items: center; gap: clamp(48px,6vw,96px); padding-block: 106px 82px; }
.hero-copy { min-width: 0; }
.eyebrow { display: flex; gap: 11px; align-items: center; margin: 0 0 22px; color: #6e7c87; font: 500 10px/1.5 var(--mono); letter-spacing: .09em; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.hero h1 { margin: 0; font-size: clamp(43px,4vw,64px); line-height: 1.33; font-weight: 700; letter-spacing: -.077em; }
.hero-name { display: inline-block; font-size: .36em; font-weight: 400; color: #757b7e; letter-spacing: -.035em; white-space: nowrap; }
.hero-name b { font-weight: 600; color: var(--ink); }
.hero h1 > span:not(.hero-name):not(.accent-dot) { color: #50575a; }
.accent-dot { color: var(--coral); }
.hero-lede { color: #6b7275; margin: 25px 0 25px; max-width: 405px; font-size: 13px; line-height: 2; letter-spacing: -.02em; }
.hero-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.hero-stack span { border: 1px solid #dfe2e3; padding: 6px 9px; color: #70797c; background: #fff; border-radius: 2px; font: 10px/1.15 var(--mono); }
.primary-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-width: 207px; padding: 13px 0; border-bottom: 1px solid var(--ink); color: #303536; font-size: 12px; font-weight: 600; transition: color .2s, border-color .2s; }
.primary-link:hover { color: var(--blue); border-color: var(--blue); }
.primary-link span { color: var(--coral); font-size: 17px; line-height: 1; }
.hero-footnote { color: #a2a6a7; font-size: 10px; margin: 13px 0 0; }
.hero-showreel { min-width: 0; padding: 12px 0 4px; border-top: 1px solid #b8bbbd; border-bottom: 1px solid #d8dadb; background: #fff; }
.showreel-top { display: flex; align-items: center; justify-content: space-between; padding: 0 0 14px; color: #92989b; font: 10px/1.4 var(--mono); letter-spacing: .09em; }
.live-mark { color: #596266; }
.live-mark i, .result-badge i { display: inline-block; vertical-align: middle; width: 6px; height: 6px; background: var(--coral); border-radius: 50%; margin-right: 8px; }
.hero-showreel .media-frame { border-radius: 1px; }
.showreel-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0 10px; }
.showreel-bottom strong { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.showreel-bottom small { display: block; color: #8b9296; font-size: 11px; }
.project-link { display: inline-flex; gap: 7px; align-items: center; color: #647789; font: 500 10px/1.5 var(--mono); white-space: nowrap; border-bottom: 1px solid #becbd9; padding-bottom: 2px; transition: color .2s, border-color .2s; }
.project-link:hover { color: var(--blue); border-color: var(--blue); }
.project-link span { font-size: 12px; color: var(--coral); }

/* Index */
.section-directory { display: grid; grid-template-columns: 78px repeat(5,1fr); align-items: center; gap: 12px; min-height: 94px; border-top: 1px solid #c8cccd; border-bottom: 1px solid #dfe1e1; }
.section-directory > span { color: #a2a8a9; font: 10px var(--mono); letter-spacing: .12em; }
.section-directory a { display: flex; flex-direction: column; gap: 7px; padding-left: 17px; border-left: 1px solid #e3e4e3; color: var(--coral); font: 11px var(--mono); }
.section-directory a b { color: #6d7477; font: 500 11px var(--mono); transition: color .2s; }
.section-directory a:hover b { color: var(--ink); }

/* Technology sections */
.portfolio-section { padding-block: 99px 34px; border-bottom: 1px solid #e9eaea; scroll-margin-top: 100px; }
.section-heading { display: grid; grid-template-columns: 155px minmax(0,1fr) minmax(235px,335px); align-items: end; gap: 29px; padding-bottom: 42px; }
.section-index { align-self: start; color: #748db5; font: 500 11px/1.5 var(--mono); letter-spacing: .09em; }
.section-heading h2 { color: var(--ink); margin: -7px 0 0; font-weight: 600; line-height: 1.38; letter-spacing: -.068em; font-size: clamp(29px,3.15vw,47px); }
.section-heading p { color: #7b8183; font-size: 12px; line-height: 2; margin: 0 0 5px; }
.system-flow-diagram { margin: 0 0 25px; border: 1px solid #e2e4e4; background: #fff; overflow: hidden; }
.system-flow-diagram img { display: block; width: 100%; height: auto; }
.media-grid { display: grid; gap: 22px; margin-bottom: 22px; }
.media-grid.two-col { grid-template-columns: repeat(2,minmax(0,1fr)); }
.media-card { display: flex; flex-direction: column; min-width: 0; padding: 17px; margin-bottom: 22px; border: 1px solid #e2e4e4; border-radius: 2px; background: #fff; transition: border-color .17s ease; }
.media-card:hover { border-color: #bfc9d5; }
.media-grid > .media-card { margin-bottom: 0; }
.feature-card { padding: 19px; }
.feature-card.accented { border-left: 3px solid #e1a2a6; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 64px; padding: 4px 2px 16px; }
.item-kicker { display: block; color: #7591ba; font: 10px/1.2 var(--mono); letter-spacing: .08em; margin-bottom: 6px; }
.card-heading h3 { margin: 0; color: #33393b; font-size: 15px; line-height: 1.45; font-weight: 600; letter-spacing: -.035em; }
.feature-card .card-heading h3 { font-size: 17px; }
.media-type { align-self: flex-start; color: #a0a4a6; font: 9px var(--mono); padding: 4px 0 4px 8px; border-left: 1px solid #d8dadb; letter-spacing: .05em; }
.result-badge { align-self: flex-start; color: #b8626b; background: #fcf2f1; border: 1px solid #f0d6d5; padding: 7px 9px; font: 10px var(--mono); white-space: nowrap; }
.media-frame { position: relative; aspect-ratio: 16/9; width: 100%; overflow: hidden; background: #f9faf9; border: 1px solid #eceeee; border-radius: 1px; }
.media-frame img { width: 100%; height: 100%; object-fit: contain; object-position: center; background: #fafafa; }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #060709; }
.frame-loading { position: absolute; inset: 0; display: flex; gap: 13px; justify-content: center; align-items: center; flex-direction: column; color: #a5adb1; background: #f7f9f9; font: 10px var(--mono); }
.media-frame.is-loaded .frame-loading { display: none; }
.loading-spinner { width: 20px; height: 20px; border: 2px solid #d7dedf; border-top-color: #d18b90; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; min-height: 47px; padding: 15px 2px 0; }
.card-footer p { margin: 0; max-width: 720px; color: #82888b; line-height: 1.7; font-size: 11px; }
.card-footer .project-link { margin-left: auto; }
.tech-note { display: grid; grid-template-columns: 150px 1fr; gap: 21px; padding: 23px 3px; border-top: 1px solid #dfe2e3; align-items: start; }
.tech-note-label { color: #9da3a5; font: 10px var(--mono); letter-spacing: .07em; }
.tech-note > div { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-note > div span { font-size: 11px; color: #68747a; padding: 7px 10px; border: 1px solid #e1e6ef; background: #fafdff; }
.subsection-head { display: flex; align-items: center; gap: 16px; padding: 17px 0 22px; }
.subsection-head h3 { margin: 0; font-weight: 600; letter-spacing: -.035em; font-size: 19px; }
.subsection-number { padding: 8px 10px; border: 1px solid #dee6f8; background: #f7f9ff; color: #6482b3; font: 11px var(--mono); }
.second-sub { margin-top: 41px; padding-top: 36px; border-top: 1px solid #dde0e1; }
.inline-section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding: 39px 3px 20px; }
.inline-section-title h3 { margin: 0; padding-left: 13px; border-left: 2px solid #e6a3a6; font-size: 18px; font-weight: 600; letter-spacing: -.04em; }
.inline-section-title > span { color: #9ea5a7; font: 10px var(--mono); letter-spacing: .04em; }

/* Source index */
.projects-section { padding-block: 110px 105px; }
.projects-section .section-heading { padding-bottom: 32px; }
.project-list { border-top: 1px solid #b8bfc1; }
.project-detail { border-bottom: 1px solid #dfe2e3; scroll-margin-top: 107px; }
.project-detail:target { background: linear-gradient(90deg,rgba(222,233,253,.45),transparent 55%); }
.project-detail summary { display: grid; grid-template-columns: 57px 1fr 30px; gap: 14px; align-items: center; padding: 28px 11px; cursor: pointer; list-style: none; }
.project-detail summary::-webkit-details-marker { display: none; }
.project-idx { color: var(--coral); font: 11px var(--mono); }
.project-detail strong { color: var(--ink); font: 500 17px var(--mono); letter-spacing: .015em; }
.project-detail small { display: block; padding-top: 7px; color: #969da0; font: 11px/1.5 var(--sans); }
.plus-sign { justify-self: end; color: #7184a3; font: 25px/1 var(--mono); transition: transform .17s; }
.project-detail[open] .plus-sign { transform: rotate(45deg); }
.project-body { padding: 0 71px 26px; max-width: 870px; color: #757e81; font-size: 12px; line-height: 2; }
.project-description { margin: 0 0 22px; }
.project-video-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }
.project-video { margin: 0; min-width: 0; }
.youtube-preview,.youtube-embed { display: block; width: 100%; aspect-ratio: 16/9; border: 1px solid #dfe3e4; border-radius: 2px; background: #222; }
.media-frame > .youtube-preview,.media-frame > .youtube-embed { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; }
.youtube-preview { position: relative; overflow: hidden; padding: 0; cursor: pointer; background: linear-gradient(150deg,#dfe9fa 0%,#f6f8fa 51%,#f7dddd 100%); }
.youtube-preview::before { content: ''; position: absolute; left: 24%; top: -18%; width: 38%; height: 145%; transform: skew(-31deg); border-left: 1px solid rgba(88,110,136,.22); border-right: 1px solid rgba(88,110,136,.22); background: rgba(255,255,255,.25); }
.youtube-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.85); transition: transform .2s, filter .2s; }
.youtube-preview img.load-failed { display: none; }
.youtube-preview:hover img { transform: scale(1.02); filter: brightness(.72); }
.youtube-poster-label { position: absolute; bottom: 14px; left: 17px; font: 500 10px var(--mono); letter-spacing: .12em; color: #485b71; text-shadow: 0 1px 5px #fff; }
.youtube-preview img:not(.load-failed) ~ .youtube-poster-label { color: white; text-shadow: 0 1px 5px #16191d; }
.youtube-play-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 52px; height: 36px; border-radius: 9px; color: #fff; background: #db4848; font-size: 17px; padding-left: 2px; box-shadow: 0 2px 15px rgba(0,0,0,.22); }
.youtube-embed { aspect-ratio: 16/9; }
.project-video figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 13px; padding-top: 9px; line-height: 1.55; }
.project-video figcaption strong { color: #51595d; font-size: 11px; font-weight: 600; }
.project-video figcaption a { color: #7188a9; border-bottom: 1px solid #c8d4e4; padding-bottom: 1px; font-size: 10px; }
.project-video figcaption a:hover { color: #3e649d; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px; border-top: 1px solid var(--line); padding-block: 26px 44px; color: #969c9e; font: 10px var(--mono); }
.site-footer strong { color: #4b5356; font: 600 13px var(--sans); }
.site-footer a { color: #687fa7; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1160px) {
  .site-header { padding-inline: 30px; }
  .section-shell { width: min(calc(100% - 60px),1230px); }
  .hero { grid-template-columns: minmax(305px,.9fr) minmax(0,1.1fr); gap: 40px; }
  .section-heading { grid-template-columns: 130px 1fr 270px; gap: 20px; }
  .header-nav { gap: 15px; }
}
@media (max-width: 950px) {
  .header-nav { display: none; }
  .hero { grid-template-columns: 1fr; align-items: start; padding-block: 78px 65px; gap: 48px; }
  .hero h1 { font-size: clamp(40px,7vw,63px); }
  .hero-lede { max-width: 580px; }
  .section-directory { grid-template-columns: repeat(5,1fr); }
  .section-directory > span { display: none; }
  .section-directory a { padding-left: 12px; }
  .section-heading { grid-template-columns: 1fr 1fr; align-items: start; }
  .section-heading .section-index { grid-column: 1/-1; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 72px; }
  .site-header { height: 67px; padding-inline: 17px; }
  .brand { gap: 11px; }
  .brand-owner { font-size: 22px; }
  .brand-detail { padding-left: 10px; font-size: 8px; }
  .brand-detail small { font-size: 8px; }
  .header-cta { font-size: 10px; }
  .section-shell { width: calc(100% - 34px); }
  .hero { padding-block: 51px 43px; gap: 36px; }
  .eyebrow { font-size: 9px; margin-bottom: 16px; letter-spacing: 0; }
  .hero h1 { font-size: clamp(36px,9.4vw,47px); line-height: 1.36; }
  .hero-lede { margin-block: 19px; font-size: 12px; line-height: 1.9; }
  .hero-stack { margin-bottom: 19px; }
  .hero-stack span { font-size: 9px; }
  .hero-name { font-size: .34em; }
  .showreel-top { padding-block: 0 11px; font-size: 9px; }
  .showreel-bottom { flex-direction: column; align-items: start; padding: 13px 0; }
  .showreel-bottom strong { font-size: 12px; }
  .section-directory { gap: 1px; min-height: 79px; overflow-x: auto; }
  .section-directory a { padding-left: 7px; font-size: 10px; }
  .section-directory a b { white-space: nowrap; font-size: 9px; }
  .portfolio-section { padding-top: 76px; padding-bottom: 20px; }
  .section-heading { grid-template-columns: 1fr; gap: 13px; padding-bottom: 29px; }
  .section-heading .section-index { grid-column: 1; font-size: 10px; }
  .section-heading h2 { margin: 0; font-size: 31px; }
  .section-heading p { font-size: 12px; }
  .media-grid.two-col { grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
  .media-card,.feature-card { padding: 12px; margin-bottom: 16px; }
  .card-heading { padding-bottom: 12px; min-height: 57px; }
  .card-heading h3,.feature-card .card-heading h3 { font-size: 13px; }
  .item-kicker { font-size: 9px; }
  .media-type { font-size: 8px; }
  .card-footer { padding-top: 13px; min-height: 36px; }
  .card-footer .project-link { margin-left: 0; }
  .card-footer p { font-size: 11px; }
  .project-link { font-size: 9px; }
  .tech-note { grid-template-columns: 1fr; gap: 13px; }
  .tech-note > div span { font-size: 10px; }
  .subsection-head { gap: 10px; }
  .subsection-head h3 { font-size: 16px; }
  .inline-section-title { flex-direction: column; align-items: start; padding-top: 28px; }
  .inline-section-title h3 { font-size: 16px; }
  .result-badge { font-size: 9px; }
  .projects-section { padding-block: 75px 60px; }
  .project-detail summary { grid-template-columns: 28px 1fr 23px; gap: 9px; padding: 24px 5px; }
  .project-detail strong { font-size: 14px; }
  .project-body { padding: 0 34px 23px; font-size: 12px; }
  .project-video-grid { grid-template-columns: 1fr; gap: 25px; }
  .site-footer { padding-bottom: 31px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
