    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --accent: #1a1a2e;
      --accent-light: #0f3460;
      --highlight: #7c6fe0;
      --text-main: #1c1c1c;
      --text-sub: #555;
      --text-muted: #888;
      --border: #e0e0e0;
      --bg: #ffffff;
      --sidebar-w: 200px;
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'Noto Sans KR', sans-serif;
      font-weight: 300;
      background: var(--bg);
      color: var(--text-main);
      line-height: 1.8;
      font-size: 15px;
    }

    /* ── 전체 레이아웃 ── */
    .page-wrapper {
      max-width: 1400px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: var(--sidebar-w) 1fr var(--sidebar-w);
      padding: 0 24px;
      align-items: start;
    }

    /* ── 헤더 ── */
    header {
      grid-column: 1 / -1;
      padding: 56px 0 30px;
      border-bottom: 2px solid var(--accent);
      margin-bottom: 48px;
    }
    header h1 {
      font-family: 'Noto Serif KR', serif;
      font-size: clamp(22px, 3vw, 34px);
      font-weight: 700;
      color: var(--accent);
      letter-spacing: -.02em;
      line-height: 1.2;
      margin-left: 10px;
    }
    .contact-row {
      margin-top: 28px;
      margin-left: 16px;
      margin-bottom: -12px;
      display: flex;
      gap: 24px;
      flex-wrap: wrap;
      align-items: center;
    }
    .contact-row a, .contact-row span {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      color: var(--text-muted);
      text-decoration: none;
      transition: color .15s;
    }
    .contact-row a#contact-email {
      min-width: 150px;
    }
    .contact-row a:hover { color: var(--highlight); }
    .contact-row .sep { color: var(--border); user-select: none; }

    /* ── 왼쪽 사이드바 (TOC) ── */
    .toc-sidebar {
      position: sticky;
      top: 40px;
      padding-right: 20px;
      padding-top: 4px;
    }
    .toc-title { display: none; }
    .toc-sidebar ul { list-style: none; }
    .toc-sidebar ul li a {
      display: block;
      padding: 5px 0 5px 11px;
      font-size: 13px;
      color: var(--text-sub);
      text-decoration: none;
      border-left: 2px solid transparent;
      transition: all .18s;
      line-height: 1.4;
    }
    .toc-sidebar ul li a:hover,
    .toc-sidebar ul li a.active {
      color: var(--highlight);
      border-left-color: var(--highlight);
      background: #f5f3ff;
    }
    .toc-sidebar ul li.sub a {
      padding-left: 20px;
      font-size: 12px;
      color: var(--text-muted);
    }
    .toc-sidebar ul li.toc-gap {
      margin-top: 10px;
    }

    /* ── 본문 ── */
    main {
      padding: 0 40px;
      border-left: 1px solid var(--border);
      border-right: 1px solid var(--border);
      min-height: 100vh;
      min-width: 0;
    }

    section { margin-bottom: 80px; }

    section h2 {
      font-family: 'Noto Serif KR', serif;
      font-size: 21px;
      font-weight: 700;
      color: var(--accent);
      padding-bottom: 10px;
      border-bottom: 1.5px solid var(--border);
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .sec-num {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--highlight);
      background: #f3f1fd;
      padding: 2px 7px;
      border-radius: 3px;
    }
    section h3 {
      font-size: 15px;
      font-weight: 500;
      color: var(--accent-light);
      margin: 24px 0 8px;
    }
    section p { color: var(--text-sub); margin-bottom: 4px; }
    section ul {
      color: var(--text-sub);
      padding-left: 20px;
      margin-bottom: 12px;
    }
    section li { margin-bottom: 5px; }

    /* ── 타임라인 내 p 마진 초기화 ── */
    .timeline-item p { margin-bottom: 2px; }

    /* ── 스크린샷 그리드 ── */
    .screenshot-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin: 0;
    }
    .screenshot-grid img {
      width: 100%;
      border-radius: 4px;
      border: 1px solid var(--border);
      display: block;
    }

    /* ── 프로젝트 영상 ── */
    .project-video {
      width: 75%;
      display: block;
      margin: 0 auto 8px;
      border-radius: 4px;
      border: 1px solid var(--border);
    }

    /* ── 다이어그램 ── */
    .diagram-img {
      width: 100%;
      border-radius: 4px;
      border: 1px solid var(--border);
      display: block;
      margin: 10px 0 0;
    }

    /* ── 로고 및 한 줄 소개 ── */
    .project-logo-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: 16px 0 4px;
    }
    .project-logo-wrap img {
      width: 50%;
      display: block;
    }
    .project-tagline {
      text-align: center;
      font-size: 16px;
      font-weight: 300;
      color: var(--text-sub);
      margin-top: 10px;
      margin-bottom: 4px;
    }
    ul.project-features {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    ul.project-features li {
      font-size: 15px;
      font-weight: 300;
      color: var(--text-sub);
      margin-bottom: 6px;
      padding-left: 1em;
      text-indent: -1em;
    }
    ul.project-features li::before {
      content: '- ';
      color: var(--text-muted);
    }

    /* ── 큰 섹션 ── */
    .main-section > h2 {
      margin-bottom: 20px;
    }

    /* ── 큰 섹션 펼치기 ── */
    details.card-section {
      margin-top: 6px;
    }
    details.card-section summary {
      font-size: 15px;
      font-weight: 500;
      color: var(--accent-light);
      padding: 12px 0;
      cursor: pointer;
      list-style: none;
      display: flex;
      align-items: center;
      gap: 8px;
      user-select: none;
    }
    details.card-section summary::-webkit-details-marker { display: none; }
    details.card-section summary::before {
      content: '▶';
      font-size: 9px;
      color: var(--highlight);
      transition: transform .2s;
    }
    details.card-section[open] > summary::before { transform: rotate(90deg); }
    details.card-section summary:hover { color: var(--highlight); }
    .card-section-body { padding-bottom: 8px; }

    /* ── 함수 항목 ── */
    .func-list { margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
    .func-item {
      border: 1px solid var(--border);
      border-radius: 4px;
      overflow: hidden;
    }
    .func-header {
      font-family: 'JetBrains Mono', monospace;
      font-size: 13px;
      font-weight: 600;
      color: var(--accent-light);
      padding: 10px 14px;
      background: #f8f9fb;
      border-bottom: 1px solid var(--border);
    }
    .func-body { padding: 14px; min-width: 0; }

    /* ── 관련 코드 펼치기 ── */
    details.code-section { margin-top: 10px; }
    details.code-section > summary {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-muted);
      cursor: pointer;
      list-style: none;
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 4px 0;
      user-select: none;
    }
    details.code-section > summary::-webkit-details-marker { display: none; }
    details.code-section > summary::before {
      content: '▶';
      font-family: sans-serif;
      font-size: 8px;
      color: var(--text-muted);
      transition: transform .2s;
    }
    details.code-section[open] > summary::before { transform: rotate(90deg); }
    details.code-section > summary:hover { color: var(--highlight); }
    pre.code-box {
      background: #f5f5f5;
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 12px 14px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12.5px;
      line-height: 1.7;
      overflow-x: auto;
      color: var(--text-main);
      margin-bottom: 10px;
      max-width: 100%;
    }
    .func-desc { font-size: 13.5px; color: var(--text-sub); margin-bottom: 6px; }
    .func-desc code {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      background: #f0eeff;
      color: var(--accent-light);
      padding: 1px 5px;
      border-radius: 3px;
    }

    /* ── 프로젝트 카드 ── */
    .project-card {
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 24px 24px 20px 24px;
      margin-bottom: 20px;
      transition: box-shadow .22s;
      position: relative;
      overflow: hidden;
      min-width: 0;
    }
    .project-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 4px;
      background: var(--highlight);
    }
    .project-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.07); }
    .project-card h3 { margin-top: 0; }
    .tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 28px; }
    .tag {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      background: #f2f4f8;
      color: var(--accent-light);
      padding: 3px 9px;
      border-radius: 3px;
      border: 1px solid #dde2ec;
    }
    .project-links { margin-top: 14px; display: flex; gap: 12px; }
    .project-links a {
      font-size: 13px;
      font-weight: 500;
      color: var(--highlight);
      text-decoration: none;
      border-bottom: 1px solid transparent;
      transition: border-color .18s;
    }
    .project-links a:hover { border-bottom-color: var(--highlight); }

    /* ── 오른쪽 ── */
    .right-aside {}
    .timeline { position: relative; padding-left: 22px; }
    .timeline::before {
      content: '';
      position: absolute;
      left: 6px; top: 6px;
      width: 1px; height: calc(100% - 6px);
      background: var(--border);
    }
    .timeline-item { position: relative; margin-bottom: 26px; }
    .timeline-item::before {
      content: '';
      position: absolute;
      left: -19px; top: 7px;
      width: 8px; height: 8px;
      border-radius: 50%;
      background: var(--highlight);
      border: 2px solid white;
      box-shadow: 0 0 0 1.5px var(--highlight);
    }
    .period {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--text-muted);
      margin-bottom: 2px;
    }
    .tl-title { font-weight: 500; color: var(--accent); margin-bottom: 3px; }

    /* ── 푸터 ── */
    footer {
      grid-column: 1 / -1;
      border-top: 1px solid var(--border);
      padding: 28px 0 44px;
      text-align: center;
      color: var(--text-muted);
      font-size: 12px;
      margin-top: 24px;
    }

    /* ── 스크롤 진행 바 ── */
    #scroll-bar {
      position: fixed;
      top: 0; left: 0;
      height: 2.5px;
      background: var(--highlight);
      width: 0%;
      z-index: 999;
      transition: width .08s linear;
    }

    @media (max-width: 860px) {
      .page-wrapper { grid-template-columns: 1fr; padding: 0 18px; }
      .toc-sidebar, .right-aside { display: none; }
      main { border: none; padding: 0; }
      header, footer { grid-column: 1; }
      .contact-grid { grid-template-columns: 1fr; }
    }
    /* ── PDF 모달 ── */
    #pdf-modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.6);
      z-index: 1000;
      align-items: center;
      justify-content: center;
    }
    #pdf-modal.open { display: flex; }
    .pdf-modal-box {
      background: white;
      border-radius: 8px;
      overflow: hidden;
      width: 80vw;
      height: 88vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 60px rgba(0,0,0,.3);
    }
    .pdf-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 18px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .pdf-modal-title {
      font-family: 'JetBrains Mono', monospace;
      font-size: 13px;
      color: var(--text-sub);
    }
    .pdf-modal-close {
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
      color: var(--text-muted);
      line-height: 1;
      padding: 0 4px;
      transition: color .15s;
    }
    .pdf-modal-close:hover { color: var(--highlight); }
    #pdf-iframe {
      width: 100%;
      flex: 1;
      border: none;
    }