    :root {
      --bg:        #121212;
      --surface:   #181818;
      --surface-2: #1f1f1f;
      --surface-3: #252525;
      --chip:      #272727;
      --text:      #ffffff;
      --muted:     #b3b3b3;
      --accent:    #1ed760;
      --warn:      #ffa42b;
      --line:      #272727;
      --outline:   #7c7c7c;
      --lift:      0 8px 8px rgba(0,0,0,0.3);
      font-family: 'Inter', system-ui, sans-serif;
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
    body { background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
    a { color: inherit; text-decoration: none; }
    :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

    #bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.75; }
    #app { position: relative; z-index: 2; }
    .container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

    /* nav */
    nav {
      position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
      z-index: 1000; width: calc(100% - 48px); max-width: 1080px;
      padding: 10px 22px; border-radius: 12px;
      background: rgba(18,18,18,0.7); border: 1px solid var(--line);
      backdrop-filter: blur(12px);
      transition: background 0.3s;
      display: flex; align-items: center; justify-content: space-between;
    }
    nav.scrolled { background: rgba(18,18,18,0.94); }
    .nav-brand { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px; }
    .nav-links { display: flex; gap: 4px; align-items: center; }
    .nav-links a { color: var(--muted); font-size: 14px; font-weight: 700; padding: 8px 14px; border-radius: 500px; transition: color 0.2s, background 0.2s; }
    .nav-links a:hover { color: #fff; background: var(--chip); }
    .nav-spacer { height: 80px; }

    .hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px; z-index: 1001; }
    .hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

    /* hero */
    .hero { padding: 80px 0 60px; max-width: 720px; }
    .hero-head { display: flex; align-items: center; gap: 28px; margin-bottom: 16px; }
    .avatar { width: 136px; height: 136px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: var(--lift); }
    .hero h1 { font-size: 48px; font-weight: 700; line-height: 1.1; color: #fff; }
    .hero > h1 { margin-bottom: 16px; }
    .hero h1 .handle { font-family: 'JetBrains Mono', monospace; font-size: 38px; font-weight: 600; color: var(--muted); }
    .hero-desc { color: var(--muted); font-size: 16px; line-height: 1.7; margin-bottom: 28px; max-width: 520px; }
    .hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
    .tag { padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; font-family: 'JetBrains Mono', monospace; background: var(--chip); color: #cbcbcb; }
    .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
    .btn {
      padding: 12px 28px; border-radius: 500px; font-weight: 700; font-size: 14px; line-height: 1.2;
      border: 1px solid transparent; cursor: pointer; font-family: inherit;
      display: inline-flex; align-items: center; gap: 8px;
      transition: background 0.2s, border-color 0.2s;
    }
    .btn-primary { background: var(--accent); color: #000; }
    .btn-primary:hover { background: #3be477; }
    .btn-ghost { background: transparent; color: #fff; border-color: var(--outline); }
    .btn-ghost:hover { border-color: #fff; }

    /* sections */
    section { padding: 64px 0; }
    .section-title { font-size: 28px; font-weight: 700; margin-bottom: 32px; color: #fff; }
    .section-title:has(+ .section-sub) { margin-bottom: 8px; }
    .section-sub { color: var(--muted); font-size: 15px; margin-bottom: 40px; }
    .divider { width: 100%; height: 1px; background: var(--line); }

    /* projects */
    .projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
    .project-card { padding: 24px; border-radius: 8px; background: var(--surface); transition: background 0.2s, box-shadow 0.2s; }
    .project-card.featured { background: var(--surface-2); }
    .project-card:hover { background: var(--surface-3); box-shadow: var(--lift); }
    .project-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
    .project-icon { width: 44px; height: 44px; border-radius: 6px; background: var(--chip); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
    .project-badge { padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--chip); color: var(--muted); }
    .badge-wip { background: rgba(255,164,43,0.14); color: var(--warn); }
    .project-name { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }
    .project-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
    .project-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
    .stack-pill { padding: 3px 9px; border-radius: 4px; font-size: 11px; font-weight: 600; font-family: 'JetBrains Mono', monospace; background: var(--chip); color: #cbcbcb; }
    .project-links { display: flex; gap: 10px; flex-wrap: wrap; }
    .proj-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 500px; font-size: 12px; font-weight: 700; border: 1px solid var(--outline); color: #fff; transition: border-color 0.2s; }
    .proj-link.primary:hover { border-color: #fff; }
    .proj-link.ghost { border-color: #4d4d4d; color: var(--muted); }

    /* skills */
    .skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
    .skill-group { padding: 20px; border-radius: 8px; background: var(--surface); }
    .skill-group-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 14px; }
    .skill-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
    .skill-item:last-child { margin-bottom: 0; }
    .skill-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
    .skill-dot.primary { background: #fff; }
    .skill-dot.secondary { background: #4d4d4d; }
    .skill-name { font-size: 14px; color: #fff; }
    .skill-level { margin-left: auto; font-size: 12px; color: var(--muted); }

    /* infra */
    .infra-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
    .infra-card { padding: 18px; border-radius: 8px; background: var(--surface); }
    .infra-info .name { font-size: 14px; font-weight: 700; color: #fff; }
    .infra-info .desc { font-size: 13px; color: var(--muted); margin-top: 3px; }
    .infra-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; border-radius: 8px; background: var(--surface-2); }
    @media (max-width: 600px) { .infra-cta { flex-direction: column; align-items: flex-start; } }

    /* contact */
    .contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
    .contact-card {
      padding: 20px; border-radius: 8px; background: var(--surface);
      display: flex; align-items: center; gap: 16px; transition: background 0.2s, box-shadow 0.2s;
      cursor: pointer; text-decoration: none; color: inherit; border: 0;
      font: inherit; text-align: left; width: 100%;
    }
    .contact-card:hover { background: var(--surface-3); box-shadow: var(--lift); }
    .contact-icon { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--chip); color: #fff; }
    .contact-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
    .contact-value { display: block; font-size: 14px; font-weight: 700; color: #fff; }

    /* footer */
    footer {
      padding: 28px 32px; margin: 0 auto 48px; max-width: 1080px; width: calc(100% - 48px);
      border-radius: 8px; background: var(--surface);
      display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    }
    .footer-brand { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); }
    .footer-brand span { color: #fff; }
    .footer-links { display: flex; gap: 16px; }
    .footer-links a { font-size: 14px; font-weight: 700; color: var(--muted); transition: color 0.2s; }
    .footer-links a:hover { color: #fff; }

    #scrollTop {
      position: fixed; bottom: 28px; right: 28px; z-index: 999;
      width: 44px; height: 44px; border-radius: 50%;
      background: var(--surface-2); color: #fff; border: 0; cursor: pointer;
      display: flex; align-items: center; justify-content: center; font-size: 16px;
      box-shadow: var(--lift);
      opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s, background 0.2s;
    }
    #scrollTop.visible { opacity: 1; visibility: visible; }
    #scrollTop:hover { background: var(--surface-3); }

    @media (max-width: 768px) {
      nav { top: 14px; width: calc(100% - 32px); }
      .hamburger { display: flex; }
      .nav-links {
        position: fixed; top: 76px; left: 16px; right: 16px;
        flex-direction: column; align-items: stretch; background: rgba(18,18,18,0.98);
        border: 1px solid var(--line); border-radius: 8px;
        padding: 12px; gap: 4px; opacity: 0; visibility: hidden;
        transform: translateY(-14px); transition: all 0.3s;
      }
      .nav-links.active { opacity: 1; visibility: visible; transform: translateY(0); }
      .nav-links a { padding: 12px 14px; display: block; }
      .hero { padding: 48px 0 40px; }
      .hero-head { flex-direction: column; align-items: flex-start; gap: 20px; }
      .avatar { width: 104px; height: 104px; }
      .hero h1 { font-size: 34px; }
      .hero h1 .handle { font-size: 28px; }
      .projects-grid, .skills-grid, .infra-grid, .contact-cards { grid-template-columns: 1fr; }
      footer { flex-direction: column; text-align: center; margin: 0 16px 40px; width: auto; }
    }

    .back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 700; margin-bottom: 32px; transition: color 0.2s; }
    .back-link:hover { color: #fff; }
    .infra-grid.spaced { margin-bottom: 32px; }
    .infra-cta p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
    .infra-cta .btn { white-space: nowrap; flex-shrink: 0; }

/* infra-public.html: space under the page title */
.hero h1.page-title { margin-bottom: 16px; }

/* Hosting widget: floating button at the bottom left that opens a small card (affiliate link) */
.hosting-widget { position: fixed; left: 28px; bottom: 28px; z-index: 999; }
.hosting-toggle {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); color: #fff; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--lift); transition: background 0.2s, color 0.2s;
}
.hosting-toggle:hover { background: var(--surface-3); }
.hosting-toggle i { color: var(--accent); transition: color 0.2s; }
.hosting-widget.open .hosting-toggle i { color: #fff; }
.hosting-pop {
  position: absolute; left: 0; bottom: 62px; width: 320px; max-width: calc(100vw - 32px);
  padding: 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.hosting-widget.open .hosting-pop { opacity: 1; visibility: visible; transform: translateY(0); }
.hosting-pop-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.hosting-pop-sub { font-size: 13px; line-height: 1.55; color: var(--muted); margin-bottom: 14px; }
.hosting-pop-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line); transition: background 0.2s, border-color 0.2s;
}
.hosting-pop-item:hover { background: var(--surface-3); border-color: var(--outline); }
.hosting-pop-icon { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(30,215,96,0.12); color: var(--accent); font-size: 17px; }
.hosting-pop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hosting-pop-name { font-size: 14px; font-weight: 700; color: #fff; }
.hosting-pop-desc { font-size: 12px; color: var(--muted); }
.hosting-pop-note { margin-top: 10px; font-size: 11px; line-height: 1.45; color: var(--muted); }
@media (max-width: 768px) { .hosting-widget { left: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .hosting-pop, .hosting-toggle, .hosting-toggle i { transition: none; } }
