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

    :root {
      --bg:           #FFFFFF;
      --sidebar-bg:   #FAFAFA;
      --text:         #0F0F0F;
      --text-2:       #6B6B6B;
      --body-text:    #252525;
      --text-3:       #AAAAAA;
      --text-4:       #CCCCCC;
      --border:       #E8E8E8;
      --divider:      #E0E0E0;
      --accent:       #D42020;
      --article-measure: 640px;
      --article-frame: 806px;
      --serif:        'Gloock', Georgia, serif;
      --sans:         'Onest', system-ui, sans-serif;
      --mono:         'Roboto Mono', ui-monospace, monospace;
      --ease:         cubic-bezier(.2, .7, .3, 1);
    }

    html, body { height: 100%; }

    body {
      font-family: var(--sans);
      -webkit-font-smoothing: antialiased;
      background: #ECECEC;
      padding: 24px;
      min-height: 100vh;
    }

    ::-webkit-scrollbar { width: 4px; height: 4px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

    /* Outer container */
    .site {
      display: grid;
      grid-template-columns: 264px 1fr;
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      max-width: 1160px;
      margin: 0 auto;
      background: var(--bg);
      height: calc(100vh - 48px);
      min-height: 640px;
    }

    /* Sidebar */
    .sidebar {
      background: var(--sidebar-bg);
      border-right: 1px solid var(--border);
      position: relative;
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      overflow-y: auto;
    }

    .sidebar::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 3px;
      height: 48px;
      background: var(--accent);
      z-index: 1;
    }

    .avatar {
      width: 140px;
      height: 160px;
      background: var(--text);
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      flex-shrink: 0;
    }

    .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center 72%;
      transform: scale(1.12) translate(3%, 5%);
      transform-origin: center 72%;
    }

    .avatar-initials {
      font-family: var(--serif);
      font-size: 64px;
      color: #FFFFFF;
      line-height: 1;
      user-select: none;
    }

    .sidebar-content {
      padding: 28px 24px 36px;
      display: flex;
      flex-direction: column;
      gap: 24px;
      flex: 1;
    }

    .profile-name {
      font-family: var(--serif);
      font-size: 22px;
      color: var(--text);
      line-height: 1.2;
      margin-bottom: 5px;
    }

    .profile-role {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .profile-bio {
      font-family: var(--sans);
      font-size: 11.5px;
      font-weight: 300;
      color: var(--text-2);
      line-height: 1.75;
    }

    .profile-bio .site-mark {
      color: var(--accent);
      font-weight: 500;
    }

    .profile-bio .bio-break {
      display: block;
      margin-top: 8px;
    }

    .sidebar-label {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--text-3);
      text-transform: uppercase;
      letter-spacing: 0.18em;
      margin-bottom: 10px;
    }

    .status {
      margin-top: auto;
      padding-top: 14px;
      border-top: 1px solid var(--border);
    }

    .status-label {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--text-3);
      letter-spacing: 0.18em;
      text-transform: uppercase;
      margin-bottom: 8px;
    }

    .status-link {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      font-family: var(--sans);
      font-size: 13px;
      font-weight: 500;
      color: var(--text);
      text-decoration: none;
      transition: color 0.2s var(--ease), gap 0.2s var(--ease);
    }

    .status-arrow {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--accent);
      line-height: 1;
    }

    .status-link:hover {
      color: var(--accent);
      gap: 10px;
    }

    /* Connect links */
    .connect-links { display: flex; flex-direction: column; gap: 2px; }

    .connect-link {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 5px 0;
      font-family: var(--sans);
      font-size: 13px;
      font-weight: 400;
      color: var(--text-2);
      text-decoration: none;
      transition: color 0.2s var(--ease);
    }

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

    .connect-icon {
      width: 18px;
      height: 18px;
      background: var(--text);
      border-radius: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: background 0.2s var(--ease);
    }

    .connect-link:hover .connect-icon { background: var(--accent); }

    /* Main area */
    .main {
      background: var(--bg);
      overflow-y: auto;
      height: 100%;
    }

    /* View: Index */
    #view-index {
      padding: 36px 44px;
    }

    .index-eyebrow {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--text-3);
      text-transform: uppercase;
      letter-spacing: 0.18em;
      margin-bottom: 10px;
    }

    .index-title {
      font-family: var(--serif);
      font-size: 34px;
      font-weight: 400;
      color: var(--text);
      line-height: 1.1;
      margin-bottom: 10px;
    }

    .index-subtitle {
      font-family: var(--sans);
      font-size: 14px;
      font-weight: 300;
      color: var(--text-2);
      line-height: 1.6;
      margin-bottom: 24px;
    }

    .index-rule {
      border: none;
      border-top: 1px solid var(--divider);
      margin-bottom: 32px;
    }

    /* Project card */
    .card {
      color: inherit;
      text-decoration: none;
      display: grid;
      grid-template-columns: 52px 1fr;
      gap: 20px;
      padding: 24px 0;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      transition: background 0.2s var(--ease), padding 0.2s var(--ease);
      border-radius: 2px;
      margin: 0 -12px;
      padding-left: 12px;
      padding-right: 12px;
    }

    .card:first-of-type { padding-top: 0; }

    .card:hover { background: rgba(0,0,0,0.01); }

    .card-num {
      font-family: var(--serif);
      font-size: 32px;
      color: var(--border);
      line-height: 1;
      padding-top: 2px;
      user-select: none;
    }

    .card-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
    }

    .tag {
      font-family: var(--mono);
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      padding: 4px 10px;
      border-radius: 2px;
      line-height: 1;
    }

    .tag-writeup {
      color: #FFFFFF;
      background: var(--text);
    }

    .tag-visual {
      color: #FFFFFF;
      background: var(--accent);
    }

    .tag-tool {
      color: #FFFFFF;
      background: var(--text);
    }

    .tag-blog {
      color: #888888;
      background: #EBEBEB;
    }

    .card-date {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--text-3);
      letter-spacing: 0.08em;
    }

    .card-title {
      font-family: var(--serif);
      font-size: 22px;
      font-weight: 400;
      color: var(--text);
      line-height: 1.2;
      margin-bottom: 6px;
    }

    .card-desc {
      font-family: var(--sans);
      font-size: 13px;
      font-weight: 300;
      color: var(--text-2);
      line-height: 1.7;
      max-width: 540px;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .card-footer {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 12px;
    }

    .card-footer-item {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--text-3);
      letter-spacing: 0.06em;
    }

    .card-footer-sep {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--divider);
    }

    .card-read {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--accent);
      letter-spacing: 0.08em;
      margin-left: auto;
      transition: letter-spacing 0.2s var(--ease);
    }

    .card:hover .card-read { letter-spacing: 0.12em; }

    /* View: Article */
    #view-article {
      padding: 36px 44px;
    }

    .article-shell {
      max-width: var(--article-frame);
      margin: 0 auto;
    }

    .back-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 500;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      text-decoration: none;
      margin-bottom: 24px;
      cursor: pointer;
      transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
      background: var(--sidebar-bg);
      border: 1px solid var(--border);
      border-radius: 2px;
      padding: 8px 11px;
    }

    .back-link::before {
      content: '\2190';
      color: var(--accent);
      font-size: 12px;
      line-height: 1;
    }

    .back-link:hover {
      color: var(--accent);
      background: #FFFFFF;
      border-color: rgba(212,32,32,0.35);
    }

    .back-link:focus-visible {
      outline: 2px solid rgba(212,32,32,0.35);
      outline-offset: 2px;
    }

    .article-return {
      display: flex;
      width: max-content;
      margin-top: 24px;
      margin-bottom: 0;
    }

    .article-eyebrow {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 0.18em;
      margin-bottom: 12px;
    }

    .article-title {
      font-family: var(--serif);
      font-size: 36px;
      font-weight: 400;
      color: var(--text);
      line-height: 1.15;
      letter-spacing: -0.01em;
      margin-bottom: 16px;
    }

    .article-meta {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 28px;
    }

    .article-rule {
      border: none;
      border-top: 1px solid var(--divider);
      margin-bottom: 28px;
    }

    .article-intro {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 400;
      color: var(--text-2);
      line-height: 1.8;
      text-align: center;
      max-width: var(--article-measure);
      letter-spacing: 0.01em;
      margin: 0 auto 42px;
    }

    /* Screenshot placeholder */
    .screenshot {
      width: 100%;
      max-width: 100%;
      aspect-ratio: 16/9;
      background: #F5F5F5;
      border: 1px solid var(--border);
      border-radius: 4px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin: 20px 0 28px;
    }

    .screenshot-icon {
      width: 36px;
      height: 36px;
      border: 1px solid var(--border);
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #FFFFFF;
    }

    .screenshot-caption {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--text-2);
      text-transform: uppercase;
      letter-spacing: 0.12em;
      text-align: center;
      padding: 0 32px;
      line-height: 1.6;
    }

    /* Article body */
    .article-body {
      max-width: var(--article-measure);
      margin: 0 auto;
    }

    .article-body h2 {
      font-family: var(--serif);
      font-size: 22px;
      font-weight: 400;
      color: var(--text);
      line-height: 1.2;
      border-top: 1px solid var(--border);
      padding-top: 24px;
      margin-top: 32px;
      margin-bottom: 14px;
    }

    .article-body h2:first-child {
      border-top: none;
      margin-top: 0;
      padding-top: 0;
    }

    .article-body h3 {
      font-family: var(--serif);
      font-size: 17px;
      font-weight: 400;
      color: var(--text);
      line-height: 1.25;
      margin-top: 26px;
      margin-bottom: 10px;
    }

    .article-body p {
      font-family: var(--sans);
      font-size: 14px;
      font-weight: 300;
      color: var(--body-text);
      line-height: 1.68;
      margin-bottom: 14px;
    }

    .article-body p:last-child { margin-bottom: 0; }

    .article-body strong {
      color: var(--text);
      font-weight: 500;
    }

    .article-body ol {
      padding-left: 0;
      margin-bottom: 16px;
      list-style: none;
      counter-reset: steps;
    }

    .article-body ol li {
      counter-increment: steps;
      display: grid;
      grid-template-columns: 18px minmax(190px, 0.8fr) minmax(0, 1fr);
      column-gap: 12px;
      margin-bottom: 12px;
      align-items: baseline;
    }

    .article-body ol li::before {
      content: counter(steps) '.';
      font-family: var(--mono);
      font-size: 10px;
      color: var(--accent);
      letter-spacing: 0.06em;
      padding-top: 3px;
      flex-shrink: 0;
      min-width: 18px;
    }

    .article-body ol li strong {
      display: block;
    }

    .article-body ol li,
    .article-body ul li {
      font-family: var(--sans);
      font-size: 14px;
      font-weight: 300;
      color: var(--body-text);
      line-height: 1.68;
    }

    .article-body ul {
      list-style: none;
      padding: 0;
      margin-bottom: 16px;
    }

    .article-body ul li {
      display: flex;
      gap: 10px;
      margin-bottom: 10px;
      align-items: baseline;
    }

    .article-body ul li::before {
      content: '\2192';
      font-family: var(--mono);
      font-size: 10px;
      color: var(--accent);
      flex-shrink: 0;
    }

    .article-body li strong {
      color: var(--text);
      font-weight: 500;
    }

    .article-body a {
      color: var(--text);
      text-decoration: underline;
      text-underline-offset: 3px;
      text-decoration-color: var(--border);
      transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
    }

    .article-body a:hover {
      color: var(--accent);
      text-decoration-color: var(--accent);
    }

    .article-body code {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--text);
      background: #F5F5F5;
      padding: 2px 6px;
      border-radius: 2px;
      border: 1px solid var(--border);
    }

    .ref-list {
      list-style: none;
      padding: 0;
      padding-top: 2px;
    }

    .ref-list li {
      display: flex;
      gap: 10px;
      padding: 4px 0;
      align-items: baseline;
    }

    .ref-list li::before {
      content: '\2192';
      font-family: var(--mono);
      font-size: 10px;
      color: var(--accent);
      flex-shrink: 0;
    }

    /* Inline diagrams */
    .diagram {
      width: 100%;
      background: #FFFFFF;
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 24px 20px 16px;
      margin: 20px 0 28px;
    }

    .diagram svg {
      display: block;
      width: 100%;
      height: auto;
    }

    .diagram-caption {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--text-2);
      text-transform: uppercase;
      letter-spacing: 0.12em;
      text-align: center;
      line-height: 1.6;
      margin-top: 14px;
      padding: 0 24px;
    }

    /* Embedded decks */
    .deck-embed {
      margin: 26px 0 30px;
      border: 1px solid var(--border);
      border-radius: 6px;
      overflow: hidden;
      background: #0B0B0D;
    }

    .deck-embed-bar {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 9px 14px;
      background: #141316;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .deck-embed-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #E8B548;
      flex-shrink: 0;
    }

    .deck-embed-label {
      font-family: var(--mono);
      font-size: 10px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: #F2EDE4;
    }

    .deck-embed .deck-embed-open {
      margin-left: auto;
      font-family: var(--mono);
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #9A948A;
      text-decoration: none;
      transition: color 0.2s var(--ease);
    }

    .deck-embed .deck-embed-open:hover {
      color: #F2EDE4;
      text-decoration: none;
    }

    .deck-embed-viewport {
      position: relative;
    }

    .deck-embed-stage {
      position: relative;
      width: 100%;
      aspect-ratio: 16 / 9;
      overflow: hidden;
    }

    .deck-embed-frame {
      position: absolute;
      top: 0;
      left: 0;
      width: 1280px;
      height: 720px;
      border: 0;
      transform-origin: top left;
    }

    .deck-embed-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 3;
      width: 34px;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 0 3px;
      border: 0;
      border-radius: 50%;
      background: rgba(11,11,13,0.5);
      color: #F2EDE4;
      font-family: var(--sans);
      font-size: 20px;
      line-height: 1;
      cursor: pointer;
      opacity: 0.55;
      transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
    }

    .deck-embed-viewport:hover .deck-embed-arrow { opacity: 1; }
    .deck-embed-arrow:hover { background: rgba(11,11,13,0.82); }

    .deck-embed-arrow:focus-visible {
      opacity: 1;
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .deck-embed-arrow--prev { left: 8px; }
    .deck-embed-arrow--next { right: 8px; }

    .deck-embed-caption {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--text-2);
      text-transform: uppercase;
      letter-spacing: 0.12em;
      text-align: center;
      line-height: 1.6;
      padding: 12px 24px;
    }

    /* Responsive */
    @media (max-width: 768px) {
      body { padding: 0; background: var(--bg); }

      .site {
        grid-template-columns: 1fr;
        border-radius: 0;
        border: none;
        height: auto;
        min-height: 100vh;
      }

      .sidebar {
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
      }

      .avatar { width: 120px; height: 120px; }

      .sidebar-content { padding: 24px 20px; }

      .status { display: none; }

      .main { height: auto; }

      #view-index,
      #view-article { padding: 24px 20px; }

      .article-title { font-size: 28px; }

      .index-title { font-size: 28px; }

      .card { margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
    }
