/*
Theme Name: itok Magazine
Author: itok
Description: itok 큐레이션 웹진. WordPress 카테고리와 하위 카테고리, 게시글을 자동 표시합니다.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: itok
*/
:root{
  --ink:#171717;
  --muted:#777;
  --line:#e9e9e9;
  --paper:#fbfbf9;
  --soft:#f3f3ef;
  --accent:#1f6f68;
  --max:1240px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:#fff;
  color:var(--ink);
  font-family:Arial,"Noto Sans KR","Malgun Gothic",sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
img{display:block;width:100%;height:100%;object-fit:cover}
.container{width:min(calc(100% - 48px),var(--max));margin:auto}

/* Header */
.header{
  height:78px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  position:sticky;
  top:0;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(12px);
  z-index:20;
}
.nav{display:flex;align-items:center;justify-content:space-between;width:100%}
.logo{font-size:30px;font-weight:800;letter-spacing:-1.5px}
.menu{display:flex;gap:30px;font-size:12px;letter-spacing:.08em}
.menu a{position:relative}
.menu a:after{
  content:"";position:absolute;left:0;bottom:-7px;width:0;height:1px;background:var(--ink);transition:.25s
}
.menu a:hover:after{width:100%}
.tools{display:flex;gap:18px;font-size:18px}
.tool{cursor:pointer}

/* Intro / Hero */
.intro{
  display:grid;
  grid-template-columns: .85fr 1.15fr;
  min-height:570px;
  border-bottom:1px solid var(--line);
}
.intro-copy{
  padding:82px 65px 72px 0;
  display:flex;flex-direction:column;justify-content:center;
}
.kicker{font-size:10px;letter-spacing:.22em;font-weight:700;color:#777;margin-bottom:20px}
h1{
  font-size:clamp(44px,5vw,72px);
  line-height:.98;
  letter-spacing:-.055em;
  margin:0 0 28px;
  font-weight:800;
}
.intro-copy p{
  font-size:16px;line-height:1.9;color:#555;
  max-width:470px;margin:0 0 28px;word-break:keep-all;
}
.signature{font-size:11px;letter-spacing:.12em;color:#777}
.hero-image{min-height:570px;position:relative;overflow:hidden}
.hero-image img{transition:transform .8s ease}
.hero-image:hover img{transform:scale(1.025)}
.hero-caption{
  position:absolute;left:26px;bottom:24px;color:white;
  font-size:11px;letter-spacing:.13em;text-shadow:0 1px 8px #0008;
}

/* Category */
.section{padding:78px 0}
.section-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:26px}
.section-title{font-size:28px;letter-spacing:-.04em;margin:0}
.more{font-size:11px;color:#777}
.categories{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:10px;
}
.categories .category{
  position:relative;height:245px;overflow:hidden;background:#eee;
}
.categories .category img{transition:.6s}
.categories .category:hover img{transform:scale(1.05)}
.categories .category:after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(to top,rgba(0,0,0,.56),rgba(0,0,0,.03) 60%);
}
.cat-text{position:absolute;z-index:2;bottom:20px;left:20px;color:#fff}
.cat-text strong{display:block;font-size:19px;letter-spacing:-.03em;margin-bottom:5px}
.cat-text span{font-size:10px;opacity:.85}

/* Feature */
.feature{
  background:var(--paper);
  padding:22px;
  display:grid;
  grid-template-columns:1.35fr .65fr;
  min-height:420px;
}
.feature-photo{height:376px;overflow:hidden}
.feature-copy{padding:42px 34px;display:flex;flex-direction:column;justify-content:center}
.tag{font-size:10px;letter-spacing:.18em;font-weight:700;margin-bottom:18px;color:var(--accent)}
.feature-copy h2{
  font-size:34px;line-height:1.18;letter-spacing:-.05em;margin:0 0 18px;
}
.feature-copy p{font-size:14px;line-height:1.85;color:#666;margin:0 0 26px;word-break:keep-all}
.read{font-size:11px;font-weight:700;letter-spacing:.08em}

/* Stories */
.stories{display:grid;grid-template-columns:repeat(3,1fr);gap:42px 22px}
.story-image{height:225px;overflow:hidden;background:#eee}
.story-image img{transition:.5s}
.story:hover img{transform:scale(1.03)}
.story-meta{display:flex;gap:12px;margin-top:15px;font-size:9px;letter-spacing:.13em}
.story-meta .tag{margin:0}
.date{color:#aaa}
.story h3{font-size:18px;line-height:1.4;letter-spacing:-.035em;margin:9px 0 7px}
.story p{font-size:12px;color:#777;line-height:1.65;margin:0;word-break:keep-all}

/* Quote banner */
.quote{
  margin-top:78px;
  min-height:190px;
  display:flex;align-items:center;justify-content:center;
  text-align:center;
  background:
    linear-gradient(rgba(255,255,255,.74),rgba(255,255,255,.74)),
    url("assets/images/quote.webp") center/cover;
}
.quote small{display:block;font-size:9px;letter-spacing:.2em;color:#666;margin-bottom:15px}
.quote h2{font-size:25px;letter-spacing:-.045em;margin:0 0 15px}
.quote a{font-size:10px;border-bottom:1px solid #888;padding-bottom:3px}

/* Footer */
footer{border-top:1px solid var(--line);margin-top:80px;padding:42px 0 55px}
.footer-inner{display:flex;justify-content:space-between;align-items:start}
.footer-logo{font-size:26px;font-weight:800}
.footer-note{font-size:11px;color:#888;line-height:1.8;text-align:right}

/* Responsive */
@media(max-width:900px){
  .menu{gap:16px}
  .intro{grid-template-columns:1fr}
  .intro-copy{padding:65px 0 45px;min-height:auto}
  .hero-image{min-height:430px}
  .categories{grid-template-columns:repeat(3,1fr)}
  .categories .category{height:210px}
  .feature{grid-template-columns:1fr}
  .feature-photo{height:340px}
  .stories{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:620px){
  .container{width:min(calc(100% - 28px),var(--max))}
  .header{height:64px}
  .menu{display:none}
  .logo{font-size:26px}
  .intro-copy{padding:55px 0 38px}
  h1{font-size:48px}
  .hero-image{min-height:340px}
  .categories{grid-template-columns:repeat(2,1fr);gap:7px}
  .categories .category{height:185px}
  .cat-text{left:14px;bottom:14px}
  .cat-text strong{font-size:16px}
  .section{padding:58px 0}
  .feature{padding:10px}
  .feature-photo{height:260px}
  .feature-copy{padding:32px 18px 36px}
  .feature-copy h2{font-size:28px}
  .stories{grid-template-columns:1fr;gap:35px}
  .story-image{height:230px}
  .quote{margin-top:58px}
  .footer-inner{display:block}
  .footer-note{text-align:left;margin-top:18px}
}

.footer-grid{display:grid;grid-template-columns:1fr 2fr 1.2fr;gap:35px}
.footer-desc{font-size:11px;line-height:1.8;color:#888}
.footer-links{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;font-size:11px}
.footer-links a:hover{text-decoration:underline}
.copyright{font-size:10px;color:#aaa;line-height:1.7;text-align:right}
@media(max-width:700px){.footer-grid{grid-template-columns:1fr;gap:25px}.copyright{text-align:left}}
/* WordPress integration */
.nav.container{width:min(calc(100% - 48px),var(--max))}
.brand .custom-logo{max-width:160px;max-height:50px;width:auto;height:auto;object-fit:contain}
.menu ul{list-style:none;padding:0;margin:0;display:flex;gap:24px}
.menu li{position:relative}
.menu ul ul{display:none;position:absolute;top:100%;left:0;min-width:190px;padding:18px;background:white;box-shadow:0 8px 24px #0002;flex-direction:column;gap:16px}
.menu li:hover>ul,.menu li:focus-within>ul{display:flex}
.menu ul ul ul{left:100%;top:0}
.navigation-panel{position:relative}.navigation-panel summary{cursor:pointer;font-size:24px;list-style:none}
.navigation-panel summary::-webkit-details-marker{display:none}
.navigation-content{position:absolute;right:0;top:40px;width:330px;max-width:calc(100vw - 28px);max-height:75vh;overflow:auto;background:white;padding:22px;box-shadow:0 10px 40px #0002}
.navigation-content ul{padding-left:20px;line-height:2.1}
.categories .category{display:block;background:#344b48}.child-categories{padding:0;list-style:none;font-size:12px;line-height:1.9;margin:14px 0 0;color:#555}.child-categories ul{padding-left:16px}
.feature-section{padding-top:0}.latest-section{padding-top:15px}.feature-photo,.story-image{display:block}
.image-placeholder{width:100%;height:100%;min-height:160px;background:var(--soft);color:#9baba6;display:flex;align-items:center;justify-content:center;font-size:44px;font-weight:bold}
.footer-links{list-style:none;margin:0;padding:0}.footer-links li{margin:0}
.archive-heading h1,.article-title{font-size:clamp(32px,4vw,52px);line-height:1.25;overflow-wrap:anywhere}
.archive-heading{margin-bottom:35px}.archive-description{color:#666;line-height:1.8}
.archive-categories{display:flex;gap:12px;list-style:none;flex-wrap:wrap;padding:0;margin:0 0 35px}.archive-categories a{display:inline-block;padding:9px 14px;border:1px solid var(--line);font-size:13px}.archive-categories ul{list-style:none;padding-left:16px}
.reading-width{max-width:860px}.entry-content{font-size:16px;line-height:1.95;overflow-wrap:anywhere}.entry-content img{height:auto;max-width:100%}.entry-content figure{max-width:100%;margin:24px 0}.entry-content iframe,.entry-content video{max-width:100%}.entry-content a{color:var(--accent);text-decoration:underline}.entry-content h2{font-size:28px;line-height:1.4;margin-top:48px}.entry-content h3{line-height:1.5}.entry-content table{border-collapse:collapse;max-width:100%;display:block;overflow:auto}.entry-content td,.entry-content th{border:1px solid var(--line);padding:10px}.entry-content pre{overflow:auto;padding:20px;background:var(--paper)}
.article-image{margin:30px 0}.article-image img{height:auto}.byline,.breadcrumbs{font-size:12px;color:#777;margin-bottom:24px}.post-tags{font-size:13px;margin-top:30px}.empty-state{grid-column:1/-1;color:#777;padding:30px 0}
.pagination,.post-navigation{margin-top:45px}.nav-links{display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap}.page-numbers{padding:9px 13px;border:1px solid var(--line)}.page-numbers.current{background:var(--ink);color:#fff}
.search-form{display:flex;gap:8px}.search-form label{flex:1;min-width:0}input,textarea,button{font:inherit}input,textarea{max-width:100%;padding:10px;border:1px solid #ddd}input[type=search]{width:100%}button,input[type=submit]{padding:10px 16px;background:var(--ink);color:#fff;border:0;cursor:pointer}.comment-list{padding-left:20px}.comment-list .avatar{width:40px;height:40px}.comments-area{margin-top:55px}
.screen-reader-text,.skip-link{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip-link:focus{clip:auto;width:auto;height:auto;padding:15px;background:white;z-index:100;top:0;left:10px}
:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
body.admin-bar .header{top:32px}
@media(max-width:1000px){.menu{display:none}}
@media(max-width:782px){body.admin-bar .header{top:46px}}
@media(max-width:600px){body.admin-bar .header{top:0}.nav.container{width:calc(100% - 28px)}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

/* Category archive styles */
body.category { background: #fff; color: #171717; }
body.category #main-content { background: #fff; color: #171717; }
body.category .archive-heading h1 {
    font-size: 32px;
    line-height: 1.4;
    letter-spacing: -1px;
    color: #171717;
}
body.category .archive-description,
body.category .archive-categories a,
body.category .story h3,
body.category .story p { color: #171717; }
body.category .archive-categories a { background: #fff; border-color: #ddd; }
@media (max-width: 768px) {
    body.category .archive-heading h1 { font-size: 26px; }
}
