/* Shared styles for work.html / project.html (effekt.dk 레이아웃 기준) */
:root{
  --ink:#111;
  --gray:#716f6f;
  --gray-2:#9a9898;
  --line:#e4e4e4;
  --brand:#3a5662;
  --side:16px;
  --hd:80px;
  --font:"Pretendard Variable",Pretendard,"Noto Sans KR",system-ui,-apple-system,sans-serif;
  --title:"Helvetica Neue",Arial,"Pretendard Variable",Pretendard,sans-serif;
}
@media (min-width:820px){:root{--side:48px;--hd:120px}}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none !important}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font);font-weight:300;font-size:16px;line-height:1.57;color:var(--gray);background:#fff;word-break:keep-all;overflow-wrap:break-word;-webkit-font-smoothing:antialiased}
body.is-locked{overflow:hidden}
img{display:block;max-width:100%}
h1,h2,p,ul,figure,table{margin:0}
ul{padding:0;list-style:none}
a{color:inherit}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus{outline:none}
:focus-visible{outline:2px solid var(--brand);outline-offset:3px}

/* ---------- Header ---------- */
.hd{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;height:var(--hd);padding-inline:var(--side);background:#fff}
.hd__logo{--lh:28px;display:flex;flex-direction:column;align-items:stretch;gap:calc(var(--lh) * .2);text-decoration:none;color:var(--ink)}
.hd__logo img{height:var(--lh);width:auto;display:block}
/* 로고 아래 회사명: 글자를 양끝까지 벌려 로고 폭과 맞춤 */
.hd__ko{display:flex;justify-content:space-between;font-family:var(--font);font-size:calc(var(--lh) * .44);font-weight:500;line-height:1}
.hd__name{font-family:var(--font);font-size:15px;font-weight:600;letter-spacing:-.02em;line-height:.8;white-space:nowrap}
@media (min-width:820px){.hd__logo{--lh:44px}.hd__name{font-size:32px}}
.hd__nav{display:none}
.hd__nav a{font-size:1.65rem;font-weight:500;letter-spacing:-.02em;line-height:1;color:var(--gray-2);text-decoration:none;transition:color .2s ease,opacity .2s ease}
.hd__nav a:hover,.hd__nav a[aria-current="page"]{color:var(--ink)}
.hd__nav a:active{opacity:.6}
@media (min-width:820px){.hd__nav{display:flex;gap:1.1rem}}
.hd__menu{width:40px;height:40px;display:grid;place-items:center;margin-right:-8px;transition:opacity .2s ease}
.hd__menu:hover{opacity:.6}
.hd__menu:active{opacity:.4}
.hd__menu svg{width:26px;height:26px}
@media (min-width:820px){.hd__menu{display:none}}

/* mobile menu */
.mnav{position:fixed;inset:0;z-index:50;background:#fff;display:flex;flex-direction:column;padding:0 var(--side) 40px;opacity:0;transition:opacity .25s ease}
.mnav.is-open{opacity:1}
.mnav__top{display:flex;align-items:center;justify-content:space-between;height:var(--hd)}
.mnav__links{display:flex;flex-direction:column;gap:.6rem;margin-top:32px}
.mnav__links a{font-size:2.3rem;font-weight:500;letter-spacing:-.03em;line-height:1.15;color:var(--ink);text-decoration:none;transition:opacity .2s ease}
.mnav__links a:hover{opacity:.6}
.mnav__links a:active{opacity:.4}

/* ---------- Footer ---------- */
.ft{padding:72px var(--side) 48px;text-align:center;font-size:.85rem;color:var(--gray)}
.ft a{text-decoration:none;border-bottom:1px solid currentColor;transition:opacity .2s ease}
.ft a:hover{opacity:.6}
.ft__sep{margin-inline:.5rem}
.totop{display:block;margin:0 0 48px auto;width:32px;height:32px;margin-right:var(--side);transition:opacity .2s ease,transform .2s ease}
.totop:hover{opacity:.6}
.totop:active{transform:translateY(-2px)}
.totop svg{width:100%;height:100%}

/* ---------- Work grid ---------- */
.wk{padding:12px var(--side) 0}
.wk__grid{display:grid;grid-template-columns:1fr;gap:24px}
@media (min-width:640px){.wk__grid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1024px){.wk__grid{grid-template-columns:repeat(3,1fr)}}
.wk__item{display:block;text-decoration:none;color:var(--ink)}
.wk__img{display:block;position:relative;overflow:hidden;aspect-ratio:432/263;background:#f2f2f2}
.wk__img img{width:100%;height:100%;object-fit:cover;transition:transform .6s ease}
.wk__img::after{content:"";position:absolute;inset:0;background:rgba(17,17,17,.18);opacity:0;transition:opacity .3s ease}
.wk__name{display:block;margin-top:.6rem;font-size:1.05rem;font-weight:500;letter-spacing:-.02em;color:var(--ink)}
.wk__sub{display:block;font-size:.85rem;color:var(--gray)}
@media (hover:hover) and (min-width:820px){
  .wk__name,.wk__sub{opacity:0;transition:opacity .3s ease}
  .wk__item:hover .wk__name,.wk__item:hover .wk__sub,.wk__item:focus-visible .wk__name,.wk__item:focus-visible .wk__sub{opacity:1}
}
.wk__item:hover .wk__img img{transform:scale(1.02)}
.wk__item:hover .wk__img::after{opacity:1}
.wk__item:active .wk__img img{transform:scale(1)}
.wk__empty{padding:80px 0;text-align:center}

/* ---------- Project: slider ---------- */
.pj-slider{position:relative;margin-inline:0;height:min(75vw,72svh);background:#f2f2f2;overflow:hidden;user-select:none;-webkit-user-select:none}
@media (min-width:820px){.pj-slider{margin-inline:var(--side);height:calc(100svh - var(--hd) - 66px);min-height:420px}}
.pj-track{display:flex;height:100%;transition:transform .55s cubic-bezier(.4,0,.2,1)}
.pj-track.no-anim{transition:none}
.pj-slide{flex:0 0 100%;height:100%}
.pj-slide img{width:100%;height:100%;object-fit:cover}
.pj-arrow{position:absolute;top:0;bottom:0;width:20%;display:flex;align-items:center;color:#fff;z-index:2;opacity:.9;transition:opacity .2s ease}
.pj-arrow svg{width:28px;height:28px;filter:drop-shadow(0 1px 6px rgba(0,0,0,.35));transition:transform .2s ease}
.pj-arrow:hover svg{transform:scale(1.15)}
.pj-arrow:active svg{transform:scale(.95)}
.pj-arrow:disabled{opacity:0;cursor:default}
.pj-arrow--prev{left:0;justify-content:flex-start;padding-left:14px}
.pj-arrow--next{right:0;justify-content:flex-end;padding-right:14px}
.pj-arrow:focus-visible{outline:2px solid #fff;outline-offset:-6px}
.pj-slider:fullscreen{margin:0;height:100vh;background:#000}
.pj-slider:fullscreen .pj-slide img{object-fit:contain}
.pj-slider.is-fs{position:fixed;inset:0;z-index:60;margin:0;height:100vh;background:#000}
.pj-slider.is-fs .pj-slide img{object-fit:contain}
.pj-fsclose{position:absolute;top:16px;right:16px;z-index:3;width:40px;height:40px;display:none;place-items:center;color:#fff;transition:opacity .2s ease}
.pj-fsclose:hover{opacity:.6}
.pj-slider:fullscreen .pj-fsclose,.pj-slider.is-fs .pj-fsclose{display:grid}

/* bar under slider */
.pj-bar{display:flex;align-items:center;justify-content:space-between;height:52px;padding-inline:var(--side)}
@media (min-width:820px){.pj-bar{height:66px}}
.pj-count{font-size:1.1rem;font-weight:400;color:var(--ink);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.pj-tools{display:none;gap:24px}
@media (min-width:820px){.pj-tools{display:flex}}
.pj-tool{width:24px;height:24px;color:var(--ink);opacity:.75;transition:opacity .2s ease,transform .2s ease}
.pj-tool:hover{opacity:1}
.pj-tool:active{transform:scale(.9)}
.pj-tool svg{width:100%;height:100%}

/* ---------- Project: text + table ---------- */
.pj-body{max-width:calc(656px + var(--side) * 2);margin:0 auto;padding:40px var(--side) 0}
@media (min-width:820px){.pj-body{padding-top:110px}}
.pj-title{font-family:var(--title);font-weight:400;font-size:clamp(1.9rem,4vw,3.5rem);line-height:1.18;letter-spacing:-.01em;color:var(--ink);margin-bottom:28px}
@media (min-width:820px){.pj-title{margin-left:15px;margin-bottom:56px}}
.pj-en{display:block;font-size:.4em;margin-top:.6em;color:var(--gray);letter-spacing:0}
.pj-text p+p{margin-top:1.55em}
.pj-meta{width:100%;margin-top:72px;border-collapse:collapse;font-size:.9rem}
.pj-meta tr{border-top:3px solid var(--ink)}
.pj-meta tr:last-child{border-bottom:3px solid var(--ink)}
.pj-meta th,.pj-meta td{padding:16px 6px;text-align:left;vertical-align:top}
.pj-meta th{width:150px;font-weight:600;color:var(--ink)}
.pj-meta td{color:var(--gray)}
@media (max-width:640px){
  .pj-meta tr{display:block;padding:10px 6px}
  .pj-meta th,.pj-meta td{display:block;width:auto;padding:0}
}

/* ---------- Project: grid overlay ---------- */
.pj-grid{position:fixed;inset:0;z-index:55;background:#fff;overflow-y:auto;opacity:0;transition:opacity .25s ease}
.pj-grid.is-open{opacity:1}
.pj-grid__top{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;height:var(--hd);padding-inline:var(--side);background:#fff;color:var(--ink)}
.pj-grid__title{font-size:1.1rem;font-weight:500}
.pj-grid__close{width:40px;height:40px;display:grid;place-items:center;margin-right:-8px;transition:opacity .2s ease}
.pj-grid__close:hover{opacity:.6}
.pj-grid__close:active{opacity:.4}
.pj-grid__list{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;padding:0 var(--side) 48px}
@media (min-width:820px){.pj-grid__list{grid-template-columns:repeat(4,1fr);gap:24px}}
.pj-thumb{display:block;width:100%;aspect-ratio:3/2;overflow:hidden;background:#f2f2f2;transition:opacity .2s ease}
.pj-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.pj-thumb:hover img{transform:scale(1.03)}
.pj-thumb:active{opacity:.7}
.pj-thumb[aria-current="true"]{outline:2px solid var(--ink);outline-offset:3px}

.pj-missing{padding:120px var(--side);text-align:center;color:var(--ink)}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{transition-duration:.01ms !important}}
.ft a{white-space:nowrap}
@media (max-width:819px){.pj-bar{justify-content:flex-end}.totop{margin-top:24px}}
.pj-slide.is-portrait img{object-fit:contain}
/* desktop: 이름은 사진 위에 hover 로 표시 (effekt처럼 그리드 간격 24px 유지) */
@media (hover:hover) and (min-width:820px){
  .wk__item{position:relative}
  .wk__name{position:absolute;left:18px;right:18px;bottom:36px;margin:0;color:#fff;z-index:1}
  .wk__sub{position:absolute;left:18px;right:18px;bottom:16px;color:rgba(255,255,255,.85);z-index:1}
  .wk__img::after{background:linear-gradient(rgba(17,17,17,0) 45%,rgba(17,17,17,.5))}
}

/* ---------- Header: right column + sub menu (effekt) ---------- */
.hd__right{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.hd__sub{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.35rem 1rem}
.hd__sub a{font-size:1.15rem;font-weight:400;letter-spacing:.005em;line-height:1.2;color:var(--gray-2);text-decoration:none;white-space:nowrap;transition:color .2s ease,opacity .2s ease}
.hd__sub a:hover,.hd__sub a[aria-current]{color:var(--ink)}
.hd__sub a:active{opacity:.6}
.hd__cnt{color:var(--gray-2)}
.hd__subx{display:contents}
@media (min-width:820px){.hd--sub{height:auto;min-height:var(--hd);padding-block:18px}}
@media (max-width:819px){
  .hd--sub{flex-wrap:wrap;height:auto;padding-bottom:10px}
  .hd--sub .hd__logo{height:var(--hd);justify-content:center}
  .hd--sub .hd__right{order:3;width:100%;align-items:stretch}
  .hd__sub{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .hd__sub::-webkit-scrollbar{display:none}
  .hd__sub a{font-size:1rem}
}
section[id]{scroll-margin-top:170px}

/* 폰 가로보기(화면 높이가 낮을 때): 프로젝트 사진이 잘리지 않게
   - 사진은 화면 높이를 꽉 채우고(잘리지 않게 contain)
   - 위 메뉴바와 아래 번호 바를 사진 위에 띄우고 투명도 70%(흰색 30%) */
@media (orientation:landscape) and (max-height:560px){
  .pg-project{--hd:60px}
  .pg-project .hd{position:fixed;left:0;right:0;top:0;height:var(--hd);min-height:0;padding-block:0;background:rgba(255,255,255,.3)}
  .pg-project .hd > *{opacity:.7}
  .pg-project .hd__logo{--lh:26px}
  .pg-project .hd__nav a{font-size:1.05rem}
  .pg-project .hd__sub{display:none}
  .pg-project .pj-slider{margin-inline:0;height:100svh;min-height:0}
  .pg-project .pj-slide img{object-fit:contain}
  .pg-project .pj-bar{position:relative;z-index:5;height:52px;margin-top:-52px;background:rgba(255,255,255,.3)}
}

/* ---------- News & Knowledge: News / Workshop / Publication ---------- */
.nk{padding:24px var(--side) 120px}
@media (min-width:820px){.nk{padding-top:48px;padding-bottom:160px}}
.nk-empty{padding:80px 0;text-align:center;color:var(--gray-2)}
/* 바둑판: 사진은 Work 카드의 약 70% 크기, 남는 폭은 넓은 여백으로
   (Work 열 폭 = (W-gap)/n, 여기 열 폭 = 0.7배 → gap = 0.3W + …) */
.nk-grid{display:grid;grid-template-columns:1fr;gap:64px;list-style:none;margin:0;padding:0}
@media (min-width:640px){.nk-grid{grid-template-columns:repeat(2,1fr);column-gap:calc(30% + 17px);row-gap:96px}}
@media (min-width:1024px){.nk-grid{grid-template-columns:repeat(3,1fr);column-gap:calc(15% + 17px);row-gap:120px}}
.nk-card{display:block;color:inherit;text-decoration:none}
.nk-card__img{display:block;position:relative;overflow:hidden;aspect-ratio:432/263;background:#f2f2f2}
.nk-card__img img{width:100%;height:100%;object-fit:cover;transition:transform .6s ease}
.nk-card__date{display:block;margin-top:14px;font-size:.85rem;color:var(--gray-2);font-variant-numeric:tabular-nums}
.nk-card__title{display:block;margin-top:6px;font-size:1.05rem;font-weight:500;letter-spacing:-.02em;line-height:1.35;color:var(--ink)}
.nk-card__sum{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin-top:8px;font-size:.88rem;line-height:1.6;color:var(--gray)}
a.nk-card:hover .nk-card__img img{transform:scale(1.02)}
a.nk-card:active .nk-card__img img{transform:scale(1)}
a.nk-card:focus-visible{outline:2px solid var(--brand);outline-offset:6px}
/* Publication: 표지는 잘리지 않게 세로 칸 안에 맞춤 */
.nk-card--pub .nk-card__img{aspect-ratio:4/5;background:#f4f4f3}
.nk-card--pub .nk-card__img img{object-fit:contain;padding:8%}
.nk-card__more{display:inline-block;margin-top:10px;font-size:.85rem;color:var(--gray);border-bottom:1px solid var(--line);padding-bottom:2px;transition:color .2s ease,border-color .2s ease}
a.nk-card:hover .nk-card__more{color:var(--ink);border-color:var(--ink)}

/* Workshop: 작업마다 왼쪽 글(고정) + 오른쪽 사진 세로 나열, 내리면 다음 작업 */
.ws{padding:56px 0 72px;border-top:1px solid var(--line)}
.ws:first-child{border-top:0;padding-top:0}
.ws__info{margin-bottom:28px}
.ws__date{display:block;font-size:.85rem;color:var(--gray-2);font-variant-numeric:tabular-nums}
.ws__title{margin-top:6px;font-size:clamp(1.5rem,2.3vw,2rem);font-weight:500;letter-spacing:-.03em;line-height:1.2;color:var(--ink)}
.ws__text{margin-top:18px;display:grid;gap:1em;font-size:.95rem;line-height:1.7;color:var(--gray)}
.ws__imgs{display:grid;gap:16px}
.ws__imgs img{width:100%;height:auto;display:block;background:#f2f2f2}
@media (min-width:1024px){
  .ws{display:grid;grid-template-columns:1fr 2fr;gap:64px;padding:96px 0 120px}
  .ws__info{position:sticky;top:calc(var(--hd) + 72px);align-self:start;margin:0;max-width:30em}
  .ws__imgs{gap:24px}
}
