:root {
  --paper: #f3f0e8;
  --ink: #102a2b;
  --muted: #5e6e6b;
  --line: #c9cbc2;
  --orange: #f05a32;
  --mint: #b9e3d1;
  --yellow: #f3ce64;
  --white: #fffdf8;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.65;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
::selection { background: var(--orange); color: white; }

.scroll-progress {
  position: fixed; inset: 0 auto auto 0; z-index: 100;
  width: var(--scroll, 0%); height: 3px; background: var(--orange);
}
.section-shell { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.section-gap { padding-block: 150px; }
.eyebrow { margin: 0 0 24px; font-size: 12px; font-weight: 800; letter-spacing: .16em; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(16,42,43,.16);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
}
.wordmark { font-size: 24px; font-weight: 900; letter-spacing: -.08em; }
.wordmark span { color: var(--orange); }
.site-nav { display: flex; gap: 32px; font-size: 14px; font-weight: 700; }
.site-nav a { position: relative; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 2px; background: var(--orange); transition: right .2s; }
.site-nav a:hover::after, .site-nav a:focus-visible::after { right: 0; }
.menu-button { display: none; border: 0; background: none; color: var(--ink); font-weight: 800; }

.hero { min-height: calc(100svh - 74px); display: grid; grid-template-columns: 1fr 280px; gap: 8vw; align-items: center; padding-block: 80px; }
.hero h1 { margin: 0; font-size: clamp(48px, 6.6vw, 92px); line-height: 1.07; letter-spacing: -.075em; font-weight: 850; }
.hero h1 em { position: relative; z-index: 0; color: var(--orange); font-style: normal; }
.hero h1 em::after { content: ""; position: absolute; z-index: -1; left: -.03em; right: -.05em; bottom: .08em; height: .18em; background: var(--yellow); opacity: .65; transform: rotate(-1deg); }
.hero-intro { max-width: 660px; margin: 38px 0 0; color: var(--muted); font-size: clamp(17px, 1.5vw, 21px); }
.hero-links { display: flex; align-items: center; gap: 28px; margin-top: 38px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; font-weight: 800; }
.button.primary { padding: 0 26px; color: var(--white); background: var(--ink); border-radius: 2px; }
.button.primary:hover { background: var(--orange); }
.button.text-link { border-bottom: 2px solid currentColor; }
.hero-note { padding: 28px; border: 1px solid var(--ink); box-shadow: 10px 10px 0 var(--mint); transform: rotate(1.3deg); background: var(--white); }
.hero-note strong, .hero-note span { display: block; }
.hero-note strong { font-size: 20px; }
.hero-note span { color: var(--muted); font-size: 14px; }
.hero-note hr { margin: 22px 0; border: 0; border-top: 1px solid var(--line); }
.hero-note p { margin: 8px 0; font-family: Consolas, monospace; font-size: 12px; }
.note-kicker { color: var(--orange); font-weight: 800; }

.proof-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--ink); background: var(--ink); gap: 1px; }
.proof-strip article { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 154px; padding: 24px; background: var(--paper); }
.proof-strip strong { color: var(--orange); font-size: clamp(26px, 3vw, 44px); letter-spacing: -.06em; }
.proof-strip span { font-size: 14px; line-height: 1.45; }

.about { display: grid; grid-template-columns: 4fr 6fr; gap: 10vw; align-items: start; }
.section-heading h2 { margin: 0; font-size: clamp(38px, 4.5vw, 66px); line-height: 1.08; letter-spacing: -.055em; }
.sticky-heading { position: sticky; top: 130px; }
.story-copy { max-width: 700px; font-size: 18px; }
.story-copy p { margin: 0 0 28px; }
.story-copy .lead { font-size: clamp(23px, 2.4vw, 34px); line-height: 1.5; font-weight: 760; letter-spacing: -.025em; }
.story-copy blockquote { margin: 68px 0 0; padding: 34px 0 34px 34px; border-left: 5px solid var(--orange); font-size: clamp(22px, 2.5vw, 34px); font-weight: 780; line-height: 1.45; }

.work > .section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 84px; }
.work-list { border-top: 2px solid var(--ink); }
.work-item { display: grid; grid-template-columns: 230px 1fr; gap: 8vw; padding: 80px 0; border-bottom: 1px solid var(--line); }
.work-meta { position: relative; }
.work-index { display: block; margin-bottom: 32px; color: var(--orange); font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: -.08em; }
.work-meta p { font-family: Consolas, monospace; font-size: 13px; line-height: 1.4; }
.work-meta time { color: var(--muted); font-size: 13px; }
.case-label { margin: 0 0 12px; color: var(--orange); font-weight: 800; }
.work-body h3 { margin: 0 0 30px; font-size: clamp(32px, 4vw, 54px); line-height: 1.12; letter-spacing: -.05em; }
.work-body > p:not(.case-label,.result) { max-width: 780px; font-size: 18px; }
.work-body ul { margin: 36px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.work-body li { display: grid; grid-template-columns: 72px 1fr; padding: 16px 0; border-bottom: 1px solid var(--line); }
.work-body li b { color: var(--orange); font-size: 13px; }
.result { margin: 28px 0; padding: 24px 26px; background: var(--mint); font-weight: 720; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; font-family: Consolas, monospace; font-size: 11px; }

.toolbox { color: var(--white); background: var(--ink); }
.toolbox-inner { display: grid; grid-template-columns: 4fr 6fr; gap: 10vw; }
.inverse .eyebrow { color: var(--mint); }
.skill-groups article { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid rgba(255,255,255,.22); }
.skill-groups article:first-child { border-top: 1px solid rgba(255,255,255,.22); }
.skill-groups h3 { margin: 0; color: var(--yellow); font-family: Consolas, monospace; font-size: 14px; }
.skill-groups p { margin: 0; color: #d7dfda; }

.project-heading { display: grid; grid-template-columns: 1fr 1.3fr; column-gap: 8vw; margin-bottom: 72px; }
.project-heading .eyebrow { grid-column: 1 / -1; }
.project-heading > p:last-child { align-self: end; max-width: 520px; margin: 0; color: var(--muted); font-size: 17px; }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.project-card { overflow: hidden; border: 1px solid var(--ink); background: var(--white); transition: transform .22s, box-shadow .22s; }
.project-card:hover { transform: translateY(-5px); box-shadow: 10px 10px 0 var(--ink); }
.project-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.05fr 1fr; }
.project-visual { position: relative; display: block; min-height: 340px; overflow: hidden; background: #d9e5df; }
.project-visual > img { width: 100%; height: 340px; object-fit: cover; object-position: top; }
.mqtt-visual { background: #081c27; }
.mqtt-visual video { display: block; width: 100%; height: 100%; min-height: 340px; object-fit: cover; background: #081c27; }
.api-shot { position: absolute; right: 16px; bottom: 54px; width: 150px; overflow: hidden; border: 2px solid white; color: white; background: #081c27; box-shadow: 6px 6px 0 rgba(8, 28, 39, .7); }
.api-shot img { display: block; width: 100%; height: 84px; object-fit: cover; object-position: top; }
.api-shot span { display: block; padding: 7px 9px; font-family: Consolas, monospace; font-size: 10px; font-weight: 800; }
.honbam-visual { display: grid; place-items: center; background: #071b32; }
.honbam-visual img { opacity: .96; }
.live-badge { position: absolute; top: 18px; right: 18px; padding: 7px 10px; color: white; background: var(--orange); font-family: Consolas, monospace; font-size: 11px; font-weight: 800; }
.project-content { padding: 34px; }
.project-content > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.project-no { color: var(--orange); font-family: Consolas, monospace; font-weight: 800; }
.project-kind { color: var(--muted); font-size: 12px; }
.project-content h3 { margin: 28px 0 12px; font-size: 38px; letter-spacing: -.05em; }
.project-content p { color: var(--muted); }
.project-content .project-one-line { color: var(--ink); font-size: 18px; font-weight: 740; }
.project-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); font-family: Consolas, monospace; font-size: 11px; }
.project-footer a { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.stage-visual { background: #13193d; }
.stage-title { position: absolute; top: 40px; left: 38px; z-index: 2; color: white; font-size: 44px; font-weight: 900; line-height: .85; letter-spacing: -.08em; }
.poster { position: absolute; width: 125px; height: 180px; border: 6px solid white; box-shadow: 0 12px 28px rgba(0,0,0,.4); }
.poster::before, .poster::after { content: ""; position: absolute; left: 15%; right: 15%; background: rgba(255,255,255,.9); }
.poster::before { top: 18%; height: 45%; }
.poster::after { bottom: 12%; height: 6%; }
.p1 { right: 175px; bottom: 38px; background: var(--orange); transform: rotate(-8deg); }
.p2 { right: 70px; bottom: 50px; background: #2f9f88; transform: rotate(7deg); }
.p3 { right: 285px; bottom: -70px; background: var(--yellow); transform: rotate(3deg); }
.map-visual { background: #d9e1d8; }
.road { position: absolute; display: block; background: #f7f5ee; box-shadow: 0 0 0 1px #bfc7bd; }
.r1 { width: 130%; height: 45px; top: 42%; left: -10%; transform: rotate(14deg); }
.r2 { width: 45px; height: 130%; top: -10%; left: 60%; transform: rotate(-8deg); }
.r3 { width: 100%; height: 25px; top: 15%; left: 0; transform: rotate(-4deg); }
.map-pin { position: absolute; width: 22px; height: 22px; border: 6px solid var(--orange); border-radius: 50% 50% 50% 0; background: white; transform: rotate(-45deg); box-shadow: 2px 3px 7px rgba(0,0,0,.18); }
.pin1 { top: 25%; left: 24%; }.pin2 { top: 58%; left: 70%; }.pin3 { top: 72%; left: 39%; }
.map-card { position: absolute; left: 34px; bottom: 30px; display: flex; flex-direction: column; width: 200px; padding: 20px; background: white; box-shadow: 8px 8px 0 var(--mint); }
.map-card small { margin-top: 4px; color: var(--muted); }
.project-card.compact { min-height: 320px; }
.project-card.compact .project-content { display: flex; flex-direction: column; height: 100%; }
.project-card.compact .project-footer { margin-top: auto; }

.contact { color: var(--white); background: var(--orange); }
.contact-inner h2 { max-width: 900px; margin: 0; font-size: clamp(54px, 8vw, 110px); line-height: .98; letter-spacing: -.075em; }
.contact-inner > p:not(.eyebrow) { margin: 40px 0; font-size: 18px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 20px 45px; padding: 30px 0; border-block: 1px solid rgba(255,255,255,.5); font-size: clamp(18px, 2.2vw, 30px); font-weight: 800; }
.contact-links a:hover { color: var(--ink); }
.education { display: flex; gap: 32px; margin-top: 36px; font-size: 13px; }
.education span { opacity: .75; font-family: Consolas, monospace; }
.site-footer { display: flex; justify-content: space-between; padding: 26px max(24px, calc((100vw - var(--max)) / 2)); color: var(--white); background: var(--ink); font-size: 12px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

@media (max-width: 900px) {
  .section-gap { padding-block: 100px; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-note { max-width: 350px; margin-top: 30px; }
  .proof-strip { grid-template-columns: 1fr; }
  .proof-strip article { justify-content: flex-start; min-height: 120px; padding-inline: max(24px, calc((100vw - var(--max)) / 2)); }
  .about, .toolbox-inner { grid-template-columns: 1fr; }
  .sticky-heading { position: static; margin-bottom: 55px; }
  .work-item { grid-template-columns: 1fr; gap: 38px; }
  .work-meta { display: grid; grid-template-columns: 80px 1fr auto; align-items: end; }
  .work-index { margin: 0; }
  .work-meta p { margin: 0; }
  .project-heading { grid-template-columns: 1fr; }
  .project-heading > p:last-child { margin-top: 30px; }
  .project-card.featured { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section-shell { width: min(calc(100% - 32px), var(--max)); }
  .site-header { height: 64px; padding-inline: 16px; }
  .menu-button { display: block; }
  .site-nav { position: absolute; top: 64px; left: 0; right: 0; display: none; flex-direction: column; gap: 0; padding: 8px 16px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; }
  .hero { padding-block: 60px 80px; }
  .hero h1 { font-size: clamp(42px, 13.2vw, 62px); }
  .hero-intro { margin-top: 28px; }
  .hero-note { width: calc(100% - 10px); }
  .proof-strip article { padding-inline: 20px; }
  .proof-strip strong { min-width: 130px; font-size: 27px; }
  .section-heading h2 { font-size: 42px; }
  .story-copy { font-size: 16px; }
  .story-copy .lead { font-size: 22px; }
  .work > .section-heading { display: block; }
  .work-item { padding: 60px 0; }
  .work-meta { grid-template-columns: 64px 1fr; }
  .work-meta time { grid-column: 2; }
  .work-index { font-size: 46px; }
  .work-body h3 { font-size: 35px; }
  .work-body li { grid-template-columns: 58px 1fr; font-size: 14px; }
  .skill-groups article { grid-template-columns: 1fr; gap: 6px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: auto; }
  .project-visual { min-height: 270px; }
  .mqtt-visual video { min-height: 270px; }
  .api-shot { right: 12px; bottom: 50px; width: 120px; }
  .api-shot img { height: 66px; }
  .project-content { padding: 26px 22px; }
  .project-content h3 { font-size: 32px; }
  .project-footer { flex-direction: column; }
  .stage-title { left: 24px; font-size: 35px; }
  .poster { width: 98px; height: 142px; }
  .p1 { right: 110px; }.p2 { right: 28px; }.p3 { right: 190px; }
  .contact-inner h2 { font-size: 54px; }
  .contact-links { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
