:root{
  --bg:#0b0f19;
  --card:#121a2b;
  --text:#e8edf7;
  --muted:#a9b4c7;
  --line:#24314e;
  --accent:#7aa2ff;
  --accent2:#8bffd0;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

html,body{ background:var(--bg); color:var(--text); }
a{ color:var(--accent); text-decoration: none; }
a:hover{ text-decoration: underline; }

.site-header, .site-footer{ border:0; background: transparent; }

.page-content{
  padding-top: 28px;
}

h1,h2,h3{ letter-spacing: -0.02em; }
h1{ font-size: 2.2rem; margin-top: 0; }
h2{ margin-top: 42px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
h3{ margin-top: 18px; }

hr{ border:0; border-top:1px solid var(--line); margin: 28px 0; }

.card{
  background: linear-gradient(180deg, rgba(18,26,43,.92), rgba(18,26,43,.75));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  padding: 22px 22px;
  box-shadow: var(--shadow);
}

.header-grid{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 860px){
  .header-grid{ grid-template-columns: 1fr; }
}

.badges{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .9rem;
}

.kpi{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kpi .box{
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding: 12px 12px;
}
.kpi .label{ color: var(--muted); font-size: .85rem; }
.kpi .value{ font-weight: 700; margin-top: 4px; }

.two-col{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 860px){
  .two-col{ grid-template-columns: 1fr; }
}

.section-note{
  color: var(--muted);
  margin-top: -6px;
}

.list-tight li{ margin: 6px 0; }

.stack{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stack span{
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(122,162,255,.10);
  color: var(--text);
  font-size: .92rem;
}
.stack span.alt{
  background: rgba(139,255,208,.10);
}

.item{
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  margin: 12px 0;
}

.item .top{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
}
.item .role{ font-weight: 800; }
.item .meta{ color: var(--muted); font-size: .95rem; }

.pills{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-top: 8px;
}
.pills em{
  font-style: normal;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: .85rem;
}

.footer-contact{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
}
.btn:hover{ background: rgba(255,255,255,.07); text-decoration:none; }

.profile{
  display:flex;
  gap: 18px;
  align-items: center;
}

.avatar{
  width: 110px;
  height: 110px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

@media (max-width: 860px){
  .profile{
    flex-direction: column;
    align-items: flex-start;
  }
  .avatar{
    width: 96px;
    height: 96px;
  }
}

/* ===== Proper Centering for Minima ===== */
html, body { width: 100%; }

.wrapper {
  max-width: 1330px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* header도 같은 폭으로 */
.site-header .wrapper {
  max-width: 1330px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* 기본 테마가 page-content에 padding을 줄 때가 있어서 정리 */
.page-content {
  padding-left: 0;
  padding-right: 0;
}

/* ===== Remove Footer ===== */
.site-footer {
  display: none !important;
}

/* ===== Layout with Left TOC ===== */
.layout{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: start;
}

.toc{
  position: sticky;
  top: 18px;
  align-self: start;
}

.toc a:focus-visible{
  outline: none;
}

.toc-box{
  padding: 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.toc-title{
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ===== TOC (Clean) ===== */
.toc-link{
  display: block;
  padding: 9px 12px;
  margin: 6px 0;
  border-radius: 12px;

  color: var(--muted);
  font-weight: 500;
  text-decoration: none;

  border: 1px solid transparent;
  background: transparent;
  
  transition: 
    background .2s ease,
    color .2s ease,
    border-color .2s ease;
}

/* hover */
.toc-link:hover{
  color: var(--text);
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
}

/* visited 링크 색 제거 */
.toc-link:visited{
  color: var(--muted);
}

/* 클릭/포커스 시 파란색 제거 */
.toc-link:active,
.toc-link:focus{
  outline: none;
  color: var(--text);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
}

/* 현재 위치(수동으로 active 클래스 줄 때) */
.toc-link.active{
  color: var(--text);
  font-weight: 700;
  background: linear-gradient(
    90deg,
    rgba(122,162,255,.18),
    rgba(122,162,255,.05)
  );
  border-color: rgba(122,162,255,.35);
}

/* 모바일에서는 목차 숨기고 상단으로 */
@media (max-width: 1100px){
  .layout{
    grid-template-columns: 1fr;
  }
  .toc{
    position: relative;
    top: 0;
  }
}

html { scroll-behavior: smooth; }