/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0e0e10;
  --bg-card:   #17171a;
  --border:    #2a2a30;
  --accent:    #6c8cf5;
  --accent-dim:#6c8cf518;
  --personal:  #a478f0;
  --text-1:    #f0f0f4;
  --text-2:    #a0a0b0;
  --text-3:    #55556a;
  --sidebar-w: 280px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 사이드바 ── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-inner {
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.profile { text-align: center; }

.avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}

.name  { font-size: 20px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.title { font-size: 13px; font-weight: 500; color: var(--accent); letter-spacing: 0.04em; margin-bottom: 4px; }
.location { font-size: 12px; color: var(--text-3); }

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover, .nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  text-decoration: none;
}

.sidebar-section { }

.sidebar-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.contact-list li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.contact-list .icon { width: 14px; height: 14px; flex-shrink: 0; color: var(--text-3); }
.contact-list a { color: var(--text-2); font-size: 12px; word-break: break-all; }
.contact-list a:hover { color: var(--accent); }

.tag-group { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: var(--accent-dim); color: var(--accent); font-weight: 500;
}

/* ── 메인 ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 60px 64px;
  max-width: 900px;
}

.section {
  padding-bottom: 72px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 72px;
}
.section:last-of-type { border-bottom: none; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 36px;
}
.section-num   { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: 0.06em; }
.section-title { font-size: 22px; font-weight: 700; color: var(--text-1); }
.section-sub   { font-size: 13px; color: var(--text-3); margin-left: 4px; }

/* ── 소개 ── */
.intro-lead { font-size: 26px; font-weight: 700; line-height: 1.4; color: var(--text-1); margin-bottom: 20px; }
.intro-lead strong { color: var(--accent); }
.intro-body { font-size: 15px; color: var(--text-2); line-height: 1.8; margin-bottom: 12px; }

/* ── 경력 타임라인 ── */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: 0 28px;
  padding-bottom: 44px;
  position: relative;
}

/* 수직선 — gap(28px) 중앙(+14px) 에 배치 */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 166px;   /* 152 + 14 */
  top: 8px; bottom: 0;
  width: 1px;
  background: var(--border);
}

/* 점 — 수직선 중앙 정렬 */
.timeline-item::after {
  content: '';
  position: absolute;
  left: 162px;   /* 166 - 4(반지름) */
  top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}

.timeline-meta {
  padding-top: 2px;
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px;
}
.timeline-period { font-size: 12px; color: var(--text-3); text-align: right; white-space: nowrap; }
.timeline-badge  {
  font-size: 10px; padding: 2px 8px; border-radius: 20px;
  background: var(--accent-dim); color: var(--accent); font-weight: 600;
}

.timeline-content { padding-left: 14px; }

.company      { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.role         { font-size: 13px; color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.company-desc { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }

.desc-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.desc-list li {
  font-size: 14px; color: var(--text-2);
  padding-left: 14px; position: relative; line-height: 1.6;
}
.desc-list li::before { content: '—'; position: absolute; left: 0; color: var(--text-3); }

/* 성과·지표 하이라이트 */
.hl {
  color: var(--text-1);
  background: #6c8cf514;
  border-bottom: 1.5px solid var(--accent);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

.insight-note {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #6c8cf508;
  border-left: 3px solid var(--accent);
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

/* ── 개인 프로젝트 인라인 확장 ── */
.side-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.side-chips-label {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin-right: 2px;
}

.side-chip {
  font-size: 11px;
  color: var(--personal);
  background: #a478f010;
  border: 1px solid #a478f030;
  border-radius: 20px;
  padding: 3px 12px 3px 10px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.side-chip:hover, .side-chip[aria-expanded="true"] {
  background: #a478f020;
  border-color: var(--personal);
}

.chip-arrow {
  display: inline-block;
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid var(--personal);
  transition: transform 0.2s;
}
.side-chip[aria-expanded="true"] .chip-arrow {
  transform: rotate(180deg);
}

/* 확장 패널 */
.side-expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
  margin-top: 0;
}
.side-expand.open {
  grid-template-rows: 1fr;
  margin-top: 8px;
}

.se-inner {
  overflow: hidden;
  border-left: 2px solid var(--personal);
  background: #a478f008;
  border-radius: 0 8px 8px 0;
  padding: 0 14px;
  opacity: 0;
  transition: opacity 0.25s ease, padding 0.3s ease;
}
.side-expand.open .se-inner {
  padding: 12px 14px;
  opacity: 1;
}

.se-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.se-head strong { font-size: 13px; color: var(--text-1); }
.se-period { font-size: 11px; color: var(--text-3); }

.se-desc {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.se-metrics {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}
.se-metrics li {
  font-size: 12px;
  color: var(--text-2);
  padding-left: 10px;
  position: relative;
  line-height: 1.5;
}
.se-metrics li::before {
  content: '·';
  position: absolute;
  left: 1px;
  color: var(--personal);
}

.se-links { display: flex; gap: 6px; }

/* ── 스택 뱃지 ── */
.stack-group { display: flex; flex-wrap: wrap; gap: 6px; }
.stack {
  font-size: 11px; padding: 3px 10px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-2); font-family: 'Inter', monospace;
}

/* ── 회사 프로젝트 (리스트) ── */
.project-list { display: flex; flex-direction: column; gap: 16px; }

/* ── 개인 프로젝트 (2열 그리드) ── */
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  transition: border-color 0.15s, transform 0.15s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.project-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 10px; gap: 12px;
}

.project-company-tag {
  display: inline-block;
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--accent); background: var(--accent-dim);
  padding: 2px 8px; border-radius: 4px; margin-bottom: 6px;
}

.project-name   { font-size: 16px; font-weight: 700; color: var(--text-1); }
.project-period { font-size: 12px; color: var(--text-3); white-space: nowrap; flex-shrink: 0; padding-top: 2px; }

.project-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.project-links a { color: var(--text-3); }
.project-links a:hover { color: var(--accent); }

/* 개인 프로젝트 카드 내부 구조 */
.project-top { margin-bottom: 10px; }

.project-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.project-title-row .project-period {
  margin-left: auto;
}

.project-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 0;
}

.project-category {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 4px;
}

/* 링크 칩 */
.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-3);
  background: var(--bg);
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
}
.link-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.metric-sub-links {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}

.project-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; margin-bottom: 10px; }

/* 프로젝트 지표 리스트 */
.project-metrics {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.project-metrics li {
  font-size: 12px;
  color: var(--text-2);
  padding-left: 12px;
  position: relative;
  line-height: 1.55;
}
.project-metrics li::before {
  content: '·';
  position: absolute;
  left: 2px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.3;
}

/* 성과 지표 */
.project-result-grid { display: flex; gap: 24px; margin-bottom: 14px; flex-wrap: wrap; }
.result-item { display: flex; flex-direction: column; gap: 2px; }
.result-num   { font-size: 22px; font-weight: 700; color: var(--accent); line-height: 1; }
.result-label { font-size: 11px; color: var(--text-3); }

/* ── 역량 ── */
.skill-grid { display: flex; flex-direction: column; gap: 28px; }

.skill-category {
  font-size: 12px; font-weight: 600;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.skill-list { display: flex; flex-direction: column; gap: 10px; }

.skill-item { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 16px; }
.skill-name { font-size: 13px; color: var(--text-2); }

.skill-bar  { height: 4px; background: var(--bg-card); border-radius: 4px; overflow: hidden; }
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--personal));
  border-radius: 4px;
  transition: width 1s ease;
}

/* ── 학력 ── */
.edu-list { display: flex; flex-direction: column; gap: 20px; }
.edu-item  { display: grid; grid-template-columns: 160px 1fr; gap: 0 28px; align-items: start; }
.edu-period { font-size: 12px; color: var(--text-3); padding-top: 3px; text-align: right; }
.edu-school { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.edu-major  { font-size: 13px; color: var(--text-2); }

/* ── 연락처 ── */
.contact-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px; text-align: center;
}
.contact-desc { font-size: 15px; color: var(--text-2); margin-bottom: 24px; }
.contact-btn {
  display: inline-block; padding: 12px 32px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  transition: opacity 0.15s, transform 0.15s;
}
.contact-btn:hover { opacity: 0.85; transform: translateY(-1px); text-decoration: none; }

/* ── 푸터 ── */
.footer { padding: 24px 0; font-size: 12px; color: var(--text-3); text-align: center; }

/* ── 반응형 ── */
@media (max-width: 900px) {
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    position: relative; width: 100%; min-height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .sidebar-inner { padding: 28px 20px; }
  .main { margin-left: 0; padding: 32px 20px; }

  .timeline-item { grid-template-columns: 1fr; }
  .timeline-item::before, .timeline-item::after { display: none; }
  .timeline-meta { align-items: flex-start; }
  .timeline-content { padding-left: 0; }

  .skill-item { grid-template-columns: 140px 1fr; }
  .edu-item   { grid-template-columns: 1fr; gap: 4px; }
  .edu-period { text-align: left; }
}
