/* Brittany Chiang 스타일 참고:
   - 좌측 고정 소개 + 우측 스크롤 콘텐츠
   - 미니멀한 타이포 + subtle glow + 섹션 강조 */

:root {
  --bg: #0a192f;
  --panel: rgba(255, 255, 255, 0.03);
  --text: rgba(230, 241, 255, 0.92);
  --muted: rgba(136, 146, 176, 0.95);
  --border: rgba(230, 241, 255, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --brand: #64ffda;
  --brand-2: #6ea8ff;
  --focus: rgba(100, 255, 218, 0.38);
  --radius: 14px;
  --font: "Pretendard", system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --maxContent: 780px;
}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --panel: rgba(10, 25, 47, 0.03);
  --text: rgba(10, 25, 47, 0.92);
  --muted: rgba(10, 25, 47, 0.62);
  --border: rgba(10, 25, 47, 0.12);
  --shadow: 0 20px 60px rgba(10, 25, 47, 0.12);
  --brand: #0ea5a3;
  --brand-2: #2f6fff;
  --focus: rgba(14, 165, 163, 0.25);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(900px 700px at 20% 0%, rgba(100, 255, 218, 0.08), transparent 55%),
    radial-gradient(900px 700px at 90% 20%, rgba(110, 168, 255, 0.08), transparent 55%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  transform: translateY(-200%);
  z-index: 50;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.layout {
  width: min(1160px, calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  padding: 0 0 70px;
}

.sidebar {
  padding-top: 64px;
}

.sidebar-inner {
  position: sticky;
  top: 52px;
}

.identity-kicker {
  margin: 0 0 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

.profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(230, 241, 255, 0.16);
  background: radial-gradient(circle at 30% 20%, rgba(100, 255, 218, 0.25), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(110, 168, 255, 0.25), transparent 55%),
    rgba(255, 255, 255, 0.02);
  box-shadow: 0 0 0 6px rgba(100, 255, 218, 0.08), 0 18px 55px rgba(0, 0, 0, 0.28);
  margin-bottom: 14px;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 18%;
  display: block;
  filter: saturate(1.05) contrast(1.03);
}

/* JPG 확장자 대소문자/로드 이슈 대비: 이미지가 로드되면 배경을 약하게 */
.profile-photo:has(img[src]) {
  background: rgba(255, 255, 255, 0.02);
}

.identity {
  max-width: 42ch;
}

.identity-name {
  margin: 0;
  font-size: 44px;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.identity-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.identity-lead {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.identity-lead b {
  color: var(--text);
}

.side-nav {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.side-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.side-link::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--muted);
  opacity: 0.4;
  transition: width 160ms ease, opacity 160ms ease, background 160ms ease;
}

.side-link:hover {
  color: var(--text);
}

.side-link:hover::before {
  width: 40px;
  opacity: 0.8;
}

.side-link.is-active {
  color: var(--text);
}

.side-link.is-active::before {
  width: 44px;
  opacity: 1;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(100, 255, 218, 0.08);
}

.side-actions {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.side-meta {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
}

.meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed rgba(230, 241, 255, 0.1);
}

.meta-row:first-child {
  border-top: none;
}

.meta-row span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-row b {
  letter-spacing: -0.01em;
}

.side-links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.link:hover {
  color: var(--text);
  border-color: rgba(100, 255, 218, 0.35);
}

.section {
  padding-top: 64px;
}

.content {
  padding-top: 64px;
  padding-right: 10px;
}

.content > * {
  max-width: var(--maxContent);
}

.section-head {
  margin-bottom: 16px;
}

.section-head.row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.panel-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.panel-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 16px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.panel:hover {
  transform: translateY(-2px);
  border-color: rgba(100, 255, 218, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.panel h3 {
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.85;
}

.list b {
  color: var(--text);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
}

.tag:hover {
  color: var(--text);
  border-color: rgba(100, 255, 218, 0.28);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  overflow: hidden;
}

.tl-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  padding: 14px 14px;
  border-top: 1px solid var(--border);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.tl-item:first-child {
  border-top: none;
}

.tl-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tl-date {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
  font-family: var(--mono);
}

.tl-title {
  margin: 0;
  letter-spacing: -0.02em;
  font-size: 16px;
}

.tl-desc {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search input {
  width: min(320px, 78vw);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.search input:focus {
  box-shadow: 0 0 0 4px var(--focus);
  border-color: rgba(110, 168, 255, 0.7);
}

.button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button:hover {
  border-color: rgba(100, 255, 218, 0.35);
}

.button.primary {
  border: 1px solid rgba(100, 255, 218, 0.35);
  background: rgba(100, 255, 218, 0.08);
  color: var(--text);
}

.button.ghost {
  background: transparent;
}

.button.small {
  padding: 8px 12px;
  font-weight: 800;
  font-size: 13px;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  position: relative;
}

.icon[data-icon="close"]::before,
.icon[data-icon="close"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
}

.icon[data-icon="close"]::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.icon[data-icon="close"]::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.icon[data-icon="theme"]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: inset -6px -6px 0 0 rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .icon[data-icon="theme"]::before {
  box-shadow: inset -6px -6px 0 0 rgba(255, 255, 255, 0.35);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-footer {
  padding: 22px 0 10px;
  margin-top: 22px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.modal {
  width: min(720px, calc(100% - 30px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(10, 25, 47, 0.75);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0;
}

html[data-theme="light"] .modal {
  background: rgba(255, 255, 255, 0.95);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.modal-surface {
  margin: 0;
  padding: 16px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  margin: 0;
  letter-spacing: -0.02em;
}

.modal-body {
  padding-top: 12px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 15, 25, 0.75);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.tl-item.hidden {
  display: none;
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sidebar {
    padding-top: 26px;
  }

  .sidebar-inner {
    position: static;
  }

  .content {
    padding-top: 18px;
  }
}

@media (max-width: 740px) {
  .panel-grid,
  .panel-grid.three {
    grid-template-columns: 1fr;
  }

  .tl-item {
    grid-template-columns: 1fr;
  }
}

