/* ========= Base Theme & Reset ========= */
:root{
  --bg:#0b0d12; --card:#10131b; --soft:#171b26; --text:#e6e8ef; --muted:#9aa0ad; --line:#252a36; --accent:#7c3aed;
  --radius:18px; --radius-sm:12px; --radius-lg:22px;
  --shadow:0 10px 24px rgba(0,0,0,.32); --shadow-lg:0 18px 40px rgba(0,0,0,.38);
  --ring:rgba(124,58,237,.55); --ring-offset:rgba(124,58,237,.14);
  --max:1160px; --speed:160ms; --ease:cubic-bezier(.2,.8,.2,1);
}
@media (prefers-color-scheme: light){
  :root{ --bg:#f6f7fb; --card:#ffffff; --soft:#eef1f8; --text:#0f1218; --muted:#596173; --line:#e6e8ef; --accent:#6d28d9; --ring:rgba(109,40,217,.5); --ring-offset:rgba(109,40,217,.15); }
}
[data-theme="light"]{
  --bg:#f6f7fb; --card:#ffffff; --soft:#eef1f8; --text:#0f1218; --muted:#596173; --line:#e6e8ef; --accent:#6d28d9; --ring:rgba(109,40,217,.5); --ring-offset:rgba(109,40,217,.15);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:ui-sans-serif,system-ui,-apple-system,"Apple SD Gothic Neo",Segoe UI,Roboto,Helvetica,Arial;
  color:var(--text); background:radial-gradient(1200px 600px at 20% 10%, #13182a 0%, var(--bg) 60%) fixed;
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
.wrap{min-height:100%; display:flex; align-items:center; justify-content:center; padding:24px}
.shell{width:100%; max-width:var(--max)}
/* Focus styles */
:where(button, [role="button"], a, input).btn:focus-visible,
:where(.tile, .gallery a, .cmdk-panel, .arrow):focus-visible{ outline:none; box-shadow:0 0 0 3px var(--ring), 0 0 0 6px var(--ring-offset); }

/* ========= Progress Bar ========= */
.progress{position:fixed; inset:0 0 auto 0; height:3px; background:linear-gradient(90deg,var(--accent),#06b6d4); transform:scaleX(0); transform-origin:0 0; z-index:9999}

/* ========= Header ========= */
header{display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 14px}
.brand{display:flex; align-items:center; gap:12px}
.dot{width:10px; height:10px; border-radius:50%; background:var(--accent); box-shadow:0 0 26px var(--accent)}
.title{font-weight:800; letter-spacing:-.02em; font-size:27px}
.mini{color:var(--muted); font-size:13px}
.toolbar{display:flex; gap:8px; flex-wrap:wrap}
.btn{padding:10px 14px; border-radius:12px; border:1px solid var(--line); background:var(--soft); color:var(--text); cursor:pointer; transition:transform var(--speed) var(--ease), filter var(--speed) var(--ease), box-shadow var(--speed) var(--ease)}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform:translateY(1px)}
.btn.primary{border:none; background:linear-gradient(135deg,#5b21b6,#7c3aed,#06b6d4); color:white; box-shadow:0 8px 20px rgba(124,58,237,.28)}

/* ========= Layout ========= */
.grid{display:grid; gap:16px; grid-template-columns:1fr}
/* 우측 GitHub 섹션 제거로 단일 컬럼 유지 */
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:18px; backdrop-filter:saturate(1.02)}
.section{margin-top:16px}
h1,h2,h3{margin:0}
h1{font-size:38px; letter-spacing:-.02em}
p{margin:8px 0 0; color:var(--muted); line-height:1.7}

/* ========= Lists & Tiles ========= */
.badges{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.badge{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--soft); padding:8px 10px; border-radius:999px; font-size:12px; color:var(--muted)}
.kbd{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; background:var(--soft); border:1px solid var(--line); padding:2px 6px; border-radius:6px; font-size:12px}
.tiles{display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); margin-top:10px}
.tile{padding:16px; background:linear-gradient(180deg, var(--soft), transparent 120%); border:1px solid var(--line); border-radius:16px; transition:transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease)}
.tile:hover{transform:translateY(-2px); box-shadow:var(--shadow-lg); border-color:color-mix(in oklab, var(--line), var(--accent) 20%)}

/* ========= Repo list ========= */
.row{display:grid; gap:12px}
.repo .meta{display:flex; gap:10px; color:var(--muted); font-size:12px}

/* ========= Gallery ========= */
.gallery{display:grid; gap:8px; grid-template-columns:repeat(3,1fr)}
.gallery a{border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--soft); transition:box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease)}
.gallery img{width:100%; height:110px; object-fit:cover; transition:transform var(--speed) var(--ease), filter var(--speed) var(--ease)}
@media (hover:hover){ .gallery a:hover img{ transform:scale(1.03)} .gallery a:hover{ border-color:color-mix(in oklab, var(--line), var(--accent) 22%); box-shadow:0 10px 24px rgba(0,0,0,.28)} }

/* ========= Command Palette ========= */
.cmdk{position:fixed; inset:0; display:none; align-items:flex-start; justify-content:center; background:rgba(0,0,0,.45); backdrop-filter:blur(3px); z-index:10000}
.cmdk[aria-hidden="false"]{display:flex}
.cmdk-panel{margin-top:12vh; width:min(720px,92vw); border-radius:16px; border:1px solid var(--line); background:var(--card); box-shadow:var(--shadow-lg)}
.cmdk-head{padding:12px; border-bottom:1px solid var(--line)}
.cmdk-head input{width:100%; background:var(--soft); color:var(--text); border:1px solid var(--line); border-radius:10px; padding:12px 12px; outline:none}
.cmdk-head input:focus{box-shadow:0 0 0 3px var(--ring); border-color:color-mix(in oklab, var(--line), var(--accent) 30%)}
.cmdk-list{max-height:50vh; overflow:auto}
.cmdk-item{padding:12px 14px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center}
.cmdk-item strong{font-weight:600}

/* ========= Utilities ========= */
.hint{font-size:12px; color:var(--muted)}
.links{display:flex; flex-wrap:wrap; gap:8px}
.links a{padding:10px 12px; border-radius:12px; border:1px solid var(--line); background:var(--soft)}
.footer{margin-top:16px; font-size:13px; color:var(--muted); display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap}

/* ========= Lightbox ========= */
.lightbox{position:fixed; inset:0; background:rgba(0,0,0,.85); display:none; place-items:center; z-index:10001; backdrop-filter:blur(2px)}
.lightbox[aria-hidden="false"]{display:grid}
.lightbox img{max-width:92vw; max-height:84vh; border-radius:14px; border:1px solid var(--line); box-shadow:var(--shadow-lg)}
.lightbox .nav{position:fixed; inset:auto 0 24px 0; display:flex; justify-content:center; gap:10px}
.lightbox .nav .btn{background:#111827; border-color:#1f2937}
/* Lightbox overlay navigation arrows */
.lightbox .arrow{position:fixed; top:50%; transform:translateY(-50%); width:58px; height:58px; border-radius:50%;
  background:#111827; border:1px solid #1f2937; color:var(--text); display:flex; align-items:center; justify-content:center;
  font-size:22px; cursor:pointer; opacity:.98; box-shadow:0 8px 20px rgba(0,0,0,.35); transition:transform var(--speed) var(--ease), filter var(--speed) var(--ease)}
.lightbox .arrow.left{left:16px}
.lightbox .arrow.right{right:16px}
.lightbox .arrow:hover{filter:brightness(1.08)}
.lightbox .arrow:active{transform:translateY(-50%) scale(.98)}
@media (max-width:480px){ .lightbox .arrow{width:54px; height:54px} }

/* ========= Reduced motion ========= */
@media (prefers-reduced-motion: reduce){
  .tile:hover{transform:none}
  .progress{transition:none}
  .btn{transition:none}
  .gallery img{transition:none}
  .lightbox .arrow{transition:none}
}

