  :root{
    --bg: #0a0c10;
    --surface: #12151c;
    --surface-2: #191d26;
    --border: #262b36;
    --border-soft: #1d222c;
    --text: #e6e8ec;
    --text-muted: #8891a0;
    --text-dim: #5b6472;
    --accent: #e8a33d;
    --accent-dim: #8a6a35;
    --accent-2: #5ec8d8;
    --green: #6fcf97;
    --red: #e8664d;
    --radius: 3px;
    --mono: 'IBM Plex Mono', monospace;
    --display: 'Space Grotesk', sans-serif;
    --body: 'Inter', sans-serif;
    --sidebar-w: 300px;
  }

  *{ box-sizing: border-box; margin:0; padding:0; }
  html{ scroll-behavior: smooth; }
  body{
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
  }
  a{ color: inherit; text-decoration: none; }
  ::selection{ background: var(--accent); color: #0a0c10; }

  a:focus-visible, button:focus-visible, .tree-node:focus-visible{
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: reduce){
    *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  }

  /* ---------- layout shell ---------- */
  .shell{ display:flex; min-height:100vh; }

  /* ---------- sidebar: CRXDE-style JCR tree ---------- */
  .sidebar{
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 28px 0;
    position: fixed;
    top:0; left:0; bottom:0;
    overflow-y: auto;
    z-index: 40;
    transition: transform .28s ease;
  }
  .sidebar-brand{
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 14px;
  }
  .sidebar-brand .logo-row{ display:flex; align-items:center; gap:9px; }
  .dot3{ display:flex; gap:5px; }
  .dot3 span{ width:8px; height:8px; border-radius:50%; }
  .dot3 span:nth-child(1){ background:#e8664d; }
  .dot3 span:nth-child(2){ background:#e8a33d; }
  .dot3 span:nth-child(3){ background:#6fcf97; }
  .sidebar-brand .title{
    font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-top:12px; letter-spacing:.02em;
  }
  .sidebar-brand .title strong{ color: var(--accent-2); }

  .tree{ font-family: var(--mono); font-size: 13.5px; padding: 4px 8px; }
  .tree-node{
    display:flex; align-items:center; gap:7px;
    padding: 7px 12px; border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
  }
  .tree-node:hover{ background: var(--surface-2); color: var(--text); }
  .tree-node.active{ background: var(--surface-2); color: var(--accent); }
  .tree-node.active .caret{ color: var(--accent); }
  .tree-node .caret{ font-size: 10px; width:10px; color: var(--text-dim); }
  .tree-node .icon{ opacity:.7; }
  .tree-root{ padding-left: 12px; }
  .tree-child{ padding-left: 30px; }
  .tree-grandchild{ padding-left: 48px; font-size: 12.5px; }

  .sidebar-footer{
    padding: 16px 20px 0; margin-top: 14px; border-top: 1px solid var(--border-soft);
    font-family: var(--mono); font-size: 11px; color: var(--text-dim);
  }
  .status-line{ display:flex; align-items:center; gap:7px; margin-top:8px; }
  .status-dot{ width:7px; height:7px; border-radius:50%; background: var(--green); box-shadow: 0 0 6px var(--green); }

  /* mobile toggle */
  .menu-toggle{
    display:none;
    position: fixed; top: 16px; left: 16px; z-index: 60;
    background: var(--surface); border:1px solid var(--border);
    color: var(--text); font-family: var(--mono); font-size: 12px;
    padding: 9px 12px; border-radius: var(--radius); cursor:pointer;
  }

  /* ---------- main content ---------- */
  .main{
    margin-left: var(--sidebar-w);
    width: calc(100% - var(--sidebar-w));
    padding: 0;
  }
  .section{
    padding: 90px 64px;
    border-bottom: 1px solid var(--border-soft);
    max-width: 980px;
  }
  .section:last-of-type{ border-bottom: none; }

  .path{
    font-family: var(--mono); font-size: 12px; color: var(--text-dim);
    display:flex; align-items:center; gap:6px; margin-bottom: 22px; flex-wrap:wrap;
  }
  .path .seg-accent{ color: var(--accent-2); }
  .path .sep{ color: var(--border); }

  h2.heading{
    font-family: var(--display); font-weight: 600; font-size: 34px;
    color: var(--text); margin-bottom: 8px; letter-spacing:-0.01em;
  }
  .heading-sub{ color: var(--text-muted); font-size: 15.5px; margin-bottom: 44px; max-width: 640px; }

  /* ---------- hero ---------- */
  .hero{
    padding: 110px 64px 90px;
    max-width: 980px;
  }
  .terminal{
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
  }
  .terminal-bar{
    display:flex; align-items:center; gap:8px;
    padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  }
  .terminal-bar .dot3 span{ width:10px; height:10px; }
  .terminal-bar .tb-title{ font-family: var(--mono); font-size:12px; color: var(--text-dim); margin-left: 8px; }
  .terminal-body{ padding: 26px 26px 30px; font-family: var(--mono); font-size: 14px; }
  .terminal-body-flex{ display:flex; gap: 32px; align-items: center; justify-content: space-between; }
  .terminal-col{ flex: 1; min-width: 0; }
  .photo-frame{
    flex-shrink: 0;
    width: 168px;
    height: 168px;
    border: 1px solid var(--accent-2);
    border-radius: 6px;
    background: var(--surface-2);
    overflow: hidden;
    box-shadow: 0 0 0 4px rgba(94,200,216,.06);
  }
  .profile-photo{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.92) contrast(1.03);
  }
  .req-line{ color: var(--accent-2); }
  .req-line .method{ color: var(--green); font-weight:600; }
  .req-line .caret-blink{ display:inline-block; width:8px; background: var(--accent-2); animation: blink 1s step-end infinite; margin-left:2px; }
  @keyframes blink{ 50%{ opacity:0; } }
  .json-out{ margin-top: 18px; color: var(--text-muted); white-space: pre-wrap; opacity:0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
  .json-out.show{ opacity:1; transform: translateY(0); }
  .json-key{ color: var(--accent-2); }
  .json-str{ color: var(--accent); }
  .json-num{ color: var(--green); }
  .json-punc{ color: var(--text-dim); }

  .hero-tagline{ margin-top: 34px; font-size: 17px; color: var(--text-muted); max-width: 620px; line-height:1.7; }
  .hero-cta{ display:flex; gap:14px; margin-top: 34px; flex-wrap:wrap; }
  .btn{
    font-family: var(--mono); font-size: 13px; padding: 12px 20px; border-radius: var(--radius);
    border: 1px solid var(--border); transition: all .15s ease; display:inline-flex; align-items:center; gap:8px;
  }
  .btn-primary{ background: var(--accent); color:#12100b; border-color: var(--accent); font-weight:600; }
  .btn-primary:hover{ background:#f0b256; }
  .btn-secondary{ color: var(--text); }
  .btn-secondary:hover{ border-color: var(--accent-2); color: var(--accent-2); }

  /* ---------- about ---------- */
  .about-grid{ display:grid; grid-template-columns: 1.5fr 1fr; gap: 50px; }
  .about-grid p{ color: var(--text-muted); margin-bottom: 16px; font-size: 15.5px; }
  .stat-list{ display:flex; flex-direction:column; gap:0; }
  .stat{ padding: 18px 0; border-bottom: 1px solid var(--border-soft); }
  .stat:first-child{ padding-top:0; }
  .stat .num{ font-family: var(--display); font-size: 28px; color: var(--accent); font-weight:600; }
  .stat .label{ font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-top:2px; }

  /* ---------- experience: JCR node style ---------- */
  .node{
    border: 1px solid var(--border); border-radius: 5px; background: var(--surface);
    margin-bottom: 22px; overflow:hidden;
  }
  .node-head{
    display:flex; justify-content: space-between; align-items:flex-start; gap: 16px;
    padding: 18px 22px; background: var(--surface-2); border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
  }
  .node-title-wrap{ display:flex; align-items:center; gap:10px; }
  .node-icon{ color: var(--accent-2); font-family: var(--mono); font-size: 13px; }
  .node-title{ font-family: var(--display); font-weight:600; font-size: 18px; color: var(--text); }
  .node-role{ font-size: 13.5px; color: var(--text-muted); margin-top:3px; }
  .node-dates{ font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); text-align:right; white-space:nowrap; }
  .node-project{ font-family: var(--mono); font-size: 11.5px; color: var(--accent); margin-top:4px; }
  .node-body{ padding: 18px 22px 22px; }
  .prop-row{ display:flex; gap:10px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-bottom: 16px; flex-wrap:wrap; }
  .prop-row span{ background: var(--surface-2); border: 1px solid var(--border-soft); padding: 4px 9px; border-radius: 3px; }
  .node-body ul{ list-style:none; display:flex; flex-direction:column; gap:10px; }
  .node-body li{ padding-left: 20px; position:relative; color: var(--text-muted); font-size: 14.5px; }
  .node-body li::before{ content:"›"; position:absolute; left:0; color: var(--accent-2); font-family: var(--mono); }

  /* ---------- skills: felix bundle console ---------- */
  .bundle-table{ width:100%; border-collapse: collapse; font-size: 13.5px; }
  .bundle-table thead th{
    text-align:left; font-family: var(--mono); font-size: 11px; color: var(--text-dim);
    text-transform: uppercase; letter-spacing:.06em; padding: 10px 16px; border-bottom: 1px solid var(--border);
  }
  .bundle-table tbody td{ padding: 13px 16px; border-bottom: 1px solid var(--border-soft); color: var(--text-muted); }
  .bundle-table tbody tr:hover{ background: var(--surface); }
  .bundle-name{ color: var(--text); font-weight: 500; }
  .badge-active{
    font-family: var(--mono); font-size: 10.5px; padding: 3px 9px; border-radius: 12px;
    background: rgba(111,207,151,.12); color: var(--green); border:1px solid rgba(111,207,151,.3);
  }
  .badge-resolved{
    font-family: var(--mono); font-size: 10.5px; padding: 3px 9px; border-radius: 12px;
    background: rgba(94,200,216,.12); color: var(--accent-2); border:1px solid rgba(94,200,216,.3);
  }
  .skills-cat-wrap{ margin-bottom: 42px; }
  .skills-cat-label{ font-family: var(--mono); font-size: 12px; color: var(--accent); margin-bottom: 12px; letter-spacing:.04em; }
  .bundle-frame{ border:1px solid var(--border); border-radius: 5px; overflow: hidden; }

  /* ---------- certifications ---------- */
  .cert-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cert-card{
    border: 1px solid var(--border); background: var(--surface); border-radius: 5px;
    padding: 20px 22px; display:flex; gap: 16px; align-items:flex-start;
  }
  .cert-mark{
    width: 38px; height:38px; border-radius: 50%; border: 1px solid var(--accent-dim);
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
    font-family: var(--mono); font-size:12px; color: var(--accent);
  }
  .cert-name{ font-weight:600; font-size: 14.5px; color: var(--text); }
  .cert-meta{ font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); margin-top: 5px; }

  /* education / awards */
  .edu-row{ display:flex; justify-content:space-between; padding: 16px 0; border-bottom: 1px solid var(--border-soft); flex-wrap:wrap; gap:6px; }
  .edu-row:last-child{ border-bottom:none; }
  .edu-degree{ font-weight:600; font-size:15px; color: var(--text); }
  .edu-school{ font-size: 13.5px; color: var(--text-muted); }
  .edu-year{ font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); }

  .award-card{
    margin-top: 26px; border: 1px solid var(--border); border-left: 3px solid var(--accent);
    background: var(--surface); padding: 16px 20px; border-radius: 4px; font-size: 14px; color: var(--text-muted);
  }
  .award-card strong{ color: var(--text); }

  /* ---------- contact ---------- */
  .contact-panel{
    border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 34px;
  }
  .contact-panel .req-line{ margin-bottom: 20px; }
  .contact-rows{ display:flex; flex-direction:column; gap:14px; }
  .contact-row{
    display:flex; justify-content: space-between; align-items:center;
    padding: 14px 18px; background: var(--surface-2); border-radius: 4px; border:1px solid var(--border-soft);
    font-family: var(--mono); font-size: 13.5px; flex-wrap:wrap; gap:8px;
  }
  .contact-row .k{ color: var(--text-dim); }
  .contact-row .v{ color: var(--text); }
  .contact-row a.v:hover{ color: var(--accent-2); }

  footer{
    padding: 30px 64px 60px; font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
  }

  /* ---------- responsive ---------- */
  @media (max-width: 900px){
    :root{ --sidebar-w: 260px; }
    .about-grid{ grid-template-columns: 1fr; }
    .cert-grid{ grid-template-columns: 1fr; }
  }

  @media (max-width: 760px){
    .menu-toggle{ display:block; }
    .sidebar{ transform: translateX(-100%); box-shadow: 20px 0 40px rgba(0,0,0,.5); }
    .sidebar.open{ transform: translateX(0); }
    .main{ margin-left: 0; width: 100%; }
    .section{ padding: 70px 24px; }
    .hero{ padding: 100px 24px 60px; }
    h2.heading{ font-size: 26px; }
    footer{ padding: 26px 24px 50px; }
    .node-head{ flex-direction:column; }
    .node-dates{ text-align:left; }
    .terminal-body-flex{ flex-direction: column-reverse; align-items: center; gap: 20px; }
    .photo-frame{ width: 140px; height: 140px; }
  }

  /* ---------- loading screen ---------- */
  .loader{
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity .6s ease, visibility .6s ease;
  }
  .loader::before{
    content: "";
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--border-soft) 1px, transparent 1px), linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: .35;
    mask-image: radial-gradient(circle at center, rgba(0,0,0,.9) 0%, transparent 70%);
  }
  .loader.hide{ opacity: 0; visibility: hidden; pointer-events: none; }
  .loader-inner{ position: relative; text-align: center; }

  .loader-name{
    display: flex; justify-content: center; gap: 14px;
    font-family: var(--display); font-weight: 700;
    font-size: clamp(32px, 6vw, 52px);
    color: var(--text);
    letter-spacing: .01em;
  }
  .loader-name .word{ display: inline-flex; }
  .loader-name .word span{
    display: inline-block;
    opacity: 0;
    transform: translateY(16px);
    animation: letterIn .5s ease forwards;
  }

  .loader-role{
    font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent-2); margin-top: 14px;
    opacity: 0; animation: fadeUp .5s ease forwards; animation-delay: 1.05s;
  }

  .loader-bar{
    width: 220px; height: 3px; margin: 30px auto 0;
    background: var(--surface-2); border-radius: 2px; overflow: hidden;
    border: 1px solid var(--border-soft);
  }
  .loader-bar-fill{
    width: 0%; height: 100%; background: var(--accent);
    animation: fillBar 1.15s ease-out forwards; animation-delay: 1.1s;
  }

  .loader-status{
    margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--text-dim);
    opacity: 0; animation: fadeUp .4s ease forwards; animation-delay: 1.15s;
    transition: opacity .25s ease;
  }

  @keyframes letterIn{ to{ opacity: 1; transform: translateY(0); } }
  @keyframes fadeUp{ from{ opacity: 0; transform: translateY(6px); } to{ opacity: 1; transform: translateY(0); } }
  @keyframes fillBar{ to{ width: 100%; } }

  @media (prefers-reduced-motion: reduce){
    .loader-name .word span, .loader-role, .loader-status{ animation-duration: .01ms !important; }
  }

  /* ---------- scroll progress bar ---------- */
  .scroll-progress{
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 10000;
    transition: width .1s linear;
    box-shadow: 0 0 8px rgba(232,163,61,.5);
  }
