  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  a, button, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

  :root {
    --bg: #060606;
    --fg: #f0ede8;
    --muted: #777;
    --border: #111;
    --border2: #1a1a1a;
    --surface: #0d0d0d;
    --subtle: #444;
    --year: #555;
    --accent1: #7c93ff;
    --accent2: #4ecdc4;
    --accent3: #ffe66d;
    --accent4: #a8e6cf;
    --blob: rgba(255,255,255,0.07);
    --collage-bg: #0e1119;
    --collage-text: rgba(255,150,90,0.12);
  }

  [data-theme="light"] {
    --bg: #f7f8fa;
    --fg: #0a0a0a;
    --muted: #71767f;
    --border: #e4e7ec;
    --border2: #eaedf1;
    --surface: #eef0f4;
    --subtle: #bbb;
    --year: #bbb;
    --blob: rgba(0,0,0,0.04);
    --collage-bg: #e9edf5;
    --collage-text: rgba(120,70,30,0.10);
    --accent1: #3f63d6;
  }

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background 0.35s ease, color 0.35s ease;
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .fade-up { opacity: 1; }
    .name-letter { opacity: 1; transform: none; animation: none; }
  }

  /* theme toggle */
  /* eva unit-01 theme */
  [data-theme="eva"] {
    --bg: #06030f;
    --fg: #d8cff5;
    --muted: #8860b8;
    --border: #221040;
    --border2: #180a30;
    --surface: #0d0620;
    --subtle: #50308a;
    --year: #381a60;
    --accent1: #8b3fff;
    --accent2: #00e86e;
    --accent3: #ff3355;
    --accent4: #22c55e;
    --blob: rgba(120,50,240,0.18);
    --collage-bg: #090418;
    --collage-text: rgba(139,63,255,0.15);
  }

  /* Scanlines overlay */
  .eva-scanlines {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 8998;
    background-image:
      repeating-linear-gradient(0deg,transparent,transparent 3px,rgba(0,0,0,0.07) 3px,rgba(0,0,0,0.07) 4px),
      linear-gradient(rgba(139,63,255,0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(139,63,255,0.05) 1px, transparent 1px);
    background-size: auto, 48px 48px, 48px 48px;
    opacity: 0;
    transition: opacity 0.6s ease;
  }
  [data-theme="eva"] .eva-scanlines { opacity: 1; }

  /* EVA name glow */
  [data-theme="eva"] .name-display {
    text-shadow: 0 0 80px rgba(0,220,100,0.2), 0 0 160px rgba(120,50,240,0.15);
  }
  [data-theme="eva"] nav a.active { color: #00e86e; }
  [data-theme="eva"] nav a:hover  { color: #00e86e; }
  [data-theme="eva"] .nav-label::before { content: '// '; color: #50308a; }
  [data-theme="eva"] .section-label { letter-spacing: 0.3em; color: #8860b8; }
  [data-theme="eva"] .section-label::before { content: '[ '; color: #00e86e; }
  [data-theme="eva"] .section-label::after  { content: ' ]'; color: #00e86e; }
  [data-theme="eva"] .bio-left p .tag.yellow { background: #ffe66d; color: #000; }
  [data-theme="eva"] .bio-left p .tag.teal   { background: #00e86e; color: #06030f; }
  [data-theme="eva"] .bio-left p .tag.orange { background: #ff3355; color: #fff; }
  [data-theme="eva"] .bio-left p .tag.green  { background: #22c55e; color: #06030f; }
  [data-theme="eva"] .now-pulse { background: #ff3355; box-shadow: 0 0 6px #ff3355; }
  [data-theme="eva"] .project-card:hover { box-shadow: 0 0 40px rgba(139,63,255,0.35); border-color: #8b3fff; }
  [data-theme="eva"] ::-webkit-scrollbar-thumb { background: #221040; }

  /* EVA capsule toggle */
  #eva-toggle-wrap {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: calc(env(safe-area-inset-right, 0px) + 16px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  #eva-toggle {
    width: 52px; height: 28px;
    background: #f0eef8;
    border: 1.5px solid #c8bce8;
    border-radius: 100px;
    padding: 4px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
    flex-shrink: 0;
  }
  [data-theme="eva"] #eva-toggle {
    background: #060f08;
    border-color: #00e86e;
    box-shadow: 0 0 0 1px rgba(0,232,110,0.12), 0 0 14px rgba(0,232,110,0.15);
  }

  #eva-knob {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #7c4dcc;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
                background 0.35s ease,
                box-shadow 0.35s ease;
    flex-shrink: 0;
  }
  [data-theme="eva"] #eva-knob {
    transform: translateX(22px);
    background: #00e86e;
    box-shadow: 0 0 8px rgba(0,232,110,0.6);
  }



  /* custom cursor (eva mode only) */
  @media (pointer: fine) {
    html.custom-cursor[data-theme="eva"] * { cursor: none !important; }
  }
  html:not([data-theme="eva"]) #ascii-cursor,
  html:not([data-theme="eva"]) #hover-box { display: none !important; }
  html:not([data-theme="eva"]) #ascii-donut { display: none; }
  #ascii-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    width: 10px; height: 10px;
    transform: translate(-50%, -50%);
    display: none;
    background: transparent;
    border-radius: 0;
    transition: transform 0.18s cubic-bezier(0.4,0,0.2,1),
                background 0.15s ease,
                border-radius 0.15s ease;
  }
  #ascii-cursor.visible { display: block; }

  #ascii-cursor::before, #ascii-cursor::after {
    content: '';
    position: absolute;
    background: #7c4dcc;
    transition: opacity 0.15s ease;
  }
  #ascii-cursor::before {
    width: 16px; height: 1.5px;
    top: 50%; left: -3px;
    transform: translateY(-50%);
  }
  #ascii-cursor::after {
    width: 1.5px; height: 16px;
    left: 50%; top: -3px;
    transform: translateX(-50%);
  }

  /* Hover: arms retract, collapses to solid dot */
  #ascii-cursor.is-hover {
    transform: translate(-50%, -50%) scale(0.5);
    background: #7c4dcc;
    border-radius: 50%;
  }
  #ascii-cursor.is-hover::before,
  #ascii-cursor.is-hover::after { opacity: 0; }

  /* Click */
  #ascii-cursor.is-click {
    transform: translate(-50%, -50%) scale(1.6);
    transition: transform 0.08s ease;
  }

  /* EVA theme */
  [data-theme="eva"] #ascii-cursor::before,
  [data-theme="eva"] #ascii-cursor::after   { background: #00e86e; }
  [data-theme="eva"] #ascii-cursor.is-hover {
    background: #00e86e;
    box-shadow: inset 0 -1.5px 0 rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  }


  /* hover lock-on box */
  #hover-box {
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.12s ease,
                left 0.1s cubic-bezier(0.2,0,0,1),
                top 0.1s cubic-bezier(0.2,0,0,1),
                width 0.1s cubic-bezier(0.2,0,0,1),
                height 0.1s cubic-bezier(0.2,0,0,1);
  }
  #hover-box.active { opacity: 1; }
  #hover-box span {
    position: absolute;
    width: 5px; height: 5px;
    border-color: rgba(110, 65, 200, 0.7);
    border-style: solid;
    transition: border-color 0.3s;
  }
  #hover-box span:nth-child(1) { top: 0;    left: 0;  border-width: 1.5px 0 0 1.5px; }
  #hover-box span:nth-child(2) { top: 0;    right: 0; border-width: 1.5px 1.5px 0 0; }
  #hover-box span:nth-child(3) { bottom: 0; left: 0;  border-width: 0 0 1.5px 1.5px; }
  #hover-box span:nth-child(4) { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }
  [data-theme="eva"] #hover-box span { border-color: rgba(0, 232, 110, 0.65); }


  /* nerv activation overlay */
  #eva-overlay {
    position: fixed; inset: 0;
    background: #010100;
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    opacity: 0; pointer-events: none;
    transition: opacity 0.1s ease;
    font-family: 'Space Mono', monospace;
    overflow: hidden;
    padding: 0 20px;
  }
  #eva-overlay.active { opacity: 1; pointer-events: all; }
  .nerv-hazard-strip {
    width: 100%; height: 10px; flex-shrink: 0;
    background: repeating-linear-gradient(45deg,#d07010,#d07010 5px,#010100 5px,#010100 10px);
    opacity: 0.7; align-self: stretch;
  }
  .nerv-header {
    width: 100%; max-width: 580px;
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 10px 0 8px; border-bottom: 1px solid #2a1800; flex-shrink: 0;
  }
  .nerv-logo-text { font-size: 13px; font-weight: 700; letter-spacing: 0.22em; color: #d07010; text-transform: uppercase; display: block; }
  .nerv-header-sub { font-size: 8px; color: #4a2a00; letter-spacing: 0.15em; display: block; margin-top: 2px; text-transform: uppercase; }
  .nerv-header-center { font-size: 8px; letter-spacing: 0.25em; color: #4a2a00; text-transform: uppercase; align-self: center; }
  .nerv-clock { font-size: 11px; color: #d07010; letter-spacing: 0.1em; align-self: center; }
  .nerv-main-box {
    position: relative;
    width: 100%; max-width: 580px;
    padding: 24px 28px 20px;
    margin: 6px 0; flex: 0 1 auto;
    background:
      linear-gradient(#d07010,#d07010) top left  / 2px 22px no-repeat,
      linear-gradient(#d07010,#d07010) top left  / 22px 2px no-repeat,
      linear-gradient(#d07010,#d07010) top right / 2px 22px no-repeat,
      linear-gradient(#d07010,#d07010) top right / 22px 2px no-repeat,
      linear-gradient(#d07010,#d07010) bottom left  / 2px 22px no-repeat,
      linear-gradient(#d07010,#d07010) bottom left  / 22px 2px no-repeat,
      linear-gradient(#d07010,#d07010) bottom right / 2px 22px no-repeat,
      linear-gradient(#d07010,#d07010) bottom right / 22px 2px no-repeat;
    overflow: hidden;
  }
  .nerv-scan-line {
    position: absolute; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg,transparent,rgba(208,112,16,0.35),transparent);
    animation: nervScan 1.3s linear infinite; pointer-events: none;
  }
  @keyframes nervScan { 0%{top:0;opacity:0} 5%{opacity:1} 95%{opacity:1} 100%{top:100%;opacity:0} }
  .nerv-unit-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(30px,5.5vw,56px); font-weight: 900;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: #d07010; text-shadow: 0 0 24px rgba(208,112,16,0.5);
    line-height: 1; margin-bottom: 3px;
  }
  .nerv-unit-sub { font-size: 7px; letter-spacing: 0.25em; color: #4a2a00; text-transform: uppercase; margin-bottom: 18px; }
  .nerv-sync-label-text { font-size: 7px; letter-spacing: 0.3em; color: #6a3a00; text-transform: uppercase; margin-bottom: 2px; }
  .nerv-sync-big { display: flex; align-items: baseline; gap: 4px; line-height: 1; margin-bottom: 8px; }
  #eva-sync-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(56px,9vw,96px); font-weight: 900;
    color: #fff; line-height: 1; min-width: 3ch; transition: color 0.12s;
  }
  .nerv-sync-unit { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 700; color: #6a3a00; }
  .nerv-prog-track { width: 100%; height: 5px; background: #180e00; margin-bottom: 16px; }
  .nerv-prog-fill {
    height: 100%; width: 0%;
    background: #d07010; box-shadow: 0 0 8px rgba(208,112,16,0.5);
    transition: width 0.04s linear;
  }
  .nerv-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-bottom: 14px; }
  .nerv-stat-row { display: flex; flex-direction: column; gap: 1px; }
  .nerv-stat-k { font-size: 7px; letter-spacing: 0.2em; color: #4a2a00; text-transform: uppercase; }
  .nerv-stat-v { font-size: 10px; letter-spacing: 0.07em; color: #a05800; text-transform: uppercase; transition: color 0.2s; }
  .nerv-stat-v.active { color: #00cc50; }
  .nerv-magi-row { display: flex; align-items: center; gap: 14px; padding-top: 10px; border-top: 1px solid #180e00; flex-wrap: wrap; }
  .nerv-magi-label { font-size: 7px; letter-spacing: 0.3em; color: #4a2a00; text-transform: uppercase; }
  .nerv-magi-sys { display: flex; align-items: center; gap: 5px; font-size: 9px; letter-spacing: 0.12em; color: #3a1a00; text-transform: uppercase; transition: color 0.15s; }
  .nerv-magi-sys.approved { color: #00cc50; }
  .magi-dot { width: 8px; height: 8px; background: #180e00; display: inline-block; flex-shrink: 0; transition: background 0.1s, box-shadow 0.1s; }
  .magi-dot.on { background: #00cc50; box-shadow: 0 0 5px #00cc50; }
  .eva-flash { position: fixed; inset: 0; background: #d07010; z-index: 99998; opacity: 0; pointer-events: none; transition: opacity 0.04s; }
  .eva-flash.on { opacity: 0.12; }

  .page-wrapper {
    display: grid;
    grid-template-columns: 140px 1fr;
    min-height: 100vh;
  }

  /* left nav */
  nav {
    position: fixed;
    top: 0; left: 0;
    width: 140px;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 0 0 28px;
    z-index: 100;
    gap: 6px;
  }
  nav a { display: flex; align-items: center; }
  #nav-search .nav-kbd {
    margin-left: auto;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    padding: 0 5px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 3px;
    color: var(--subtle);
  }
  [data-theme="eva"] #nav-search { display: none; }
  nav a .nav-icon {
    display: inline-block;
    width: 20px;
    font-size: 12px;
    line-height: 1;
  }
  [data-theme="eva"] .nav-icon { display: none; }
  html:not([data-theme="eva"]) .nav-num { display: none; }
  nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.03em;
    padding: 4px 8px;
    margin-left: -8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    line-height: 1.6;
    display: flex;
    align-items: baseline;
    gap: 7px;
  }
  html:not([data-theme="eva"]) nav a:hover { background: var(--surface); }
  nav a:hover, nav a.active { color: var(--accent1); }
  .nav-num {
    font-family: 'Space Mono', monospace;
    font-size: 7.5px;
    letter-spacing: 0.08em;
    opacity: 0.4;
    flex-shrink: 0;
    transition: opacity 0.2s;
  }
  nav a:hover .nav-num, nav a.active .nav-num { opacity: 0.7; }
  nav .nav-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 2px solid var(--border2);
    display: block;
  }
  nav .nav-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--subtle);
    margin-bottom: 16px;
  }

  /* main */
  main {
    margin-left: 140px;
    padding: 0 40px 0 24px;
    max-width: 860px;
  }

  /* hero */
  #me {
    padding-top: 72px;
    padding-bottom: 0;
  }

  .hero-name-row {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
  }
  .name-display {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: clamp(44px, 10vw, 160px);
    line-height: 0.88;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--fg);
    user-select: none;
    position: relative;
    flex-shrink: 0;
    margin-bottom: 0;
  }
  #word-evan, #word-liem { display: block; overflow: hidden; }

  /* letter stagger reveal */
  .name-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(110%);
    animation: letterUp 0.65s cubic-bezier(0.16,1,0.3,1) forwards;
  }
  @keyframes letterUp {
    to { opacity: 1; transform: translateY(0); }
  }
  #ascii-donut {
    display: block;
    margin-left: auto;
    margin-right: -120px;
    opacity: 0.7;
    flex-shrink: 0;
  }

  .social-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
  }
  .social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, transform 0.3s cubic-bezier(.25,.46,.45,.94);
    font-weight: 400;
    will-change: transform;
  }
  .social-btn:hover { border-color: var(--accent1); color: var(--accent1); }
  .social-btn.primary {
    background: var(--accent1);
    border-color: var(--accent1);
    color: #fff;
    font-weight: 500;
  }
  .social-btn.primary:hover {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
  }
  .social-icon {
    width: 14px; height: 14px;
    fill: currentColor;
  }

  /* bio section */
  .bio {
    position: relative;
    display: grid;
    grid-template-columns: var(--bio-left, calc(50% - 22px)) minmax(0, 1fr);
    gap: 44px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
  }
  .bio-divider {
    position: absolute;
    top: 0; bottom: 36px;
    left: calc(var(--bio-left, calc(50% - 22px)) + 16px);
    width: 12px;
    cursor: col-resize;
    z-index: 5;
  }
  .bio-divider::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    translate: -50% 0;
    width: 3px;
    border-radius: 3px;
    background: var(--accent1);
    opacity: 0;
    transition: opacity 0.15s;
  }
  .bio-divider:hover::after,
  .bio-divider.dragging::after { opacity: 0.55; }
  body.col-resizing { cursor: col-resize; user-select: none; }
  .bio-left p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .bio-left p .tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #000;
    margin: 0 2px;
  }
  .bio-left p .tag.orange { background: #ff7a59; color: #481200; }
  .bio-left p .tag.teal   { background: #4cc9f0; color: #063a52; }
  .bio-left p .tag.yellow { background: #ffd43b; color: #4a3400; }
  .bio-left p .tag.green  { background: #5fd068; color: #0d3d16; }
  .bio-left p a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

  /* sections */
  section {
    padding: 64px 0;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 24px;
  }
  .section-label {
    position: relative;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--subtle);
    margin-bottom: 28px;
    padding-left: 10px;
    border-left: 2px solid var(--accent1);
  }
  html:not([data-theme="eva"]) .section-label::before {
    content: '⋮⋮';
    position: absolute;
    left: -20px; top: 50%;
    translate: 0 -50%;
    font-size: 12px;
    letter-spacing: -0.28em;
    color: var(--subtle);
    opacity: 0;
    transition: opacity 0.15s;
    cursor: grab;
  }
  html:not([data-theme="eva"]) .section-label:hover::before { opacity: 0.6; }
  h2 {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
    margin-bottom: 24px;
  }

  /* experience list */
  .exp-list { display: flex; flex-direction: column; gap: 0; }
  .exp-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    text-decoration: none;
    transition: transform 0.22s ease;
  }
  .exp-row:first-child { border-top: none; }
  a.exp-row:hover { transform: translateX(5px); }
  .exp-logo {
    width: 34px; height: 34px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--surface);
    display: block;
    flex-shrink: 0;
  }
  .exp-info { flex: 1; min-width: 0; }
  .exp-co {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    line-height: 1.3;
  }
  .exp-role {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 1px;
  }
  .exp-date {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--subtle);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .exp-arrow {
    font-size: 15px;
    color: var(--muted);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.2s, transform 0.22s ease;
    flex-shrink: 0;
    width: 16px;
  }
  .exp-row:hover .exp-arrow { opacity: 1; transform: translateX(0); }

  /* projects grid */
  .projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .project-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .project-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.15); }
  .project-card.wide { grid-column: 1 / -1; }
  .project-card.wide .project-media { aspect-ratio: 21/8; }
  .project-media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    display: block;
    background: #111;
  }
  .project-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
  }
  .project-media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
  }
  .project-card:hover .project-media img {
    transform: scale(1.04);
    filter: brightness(0.7);
  }
  .yt-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
  }
  .yt-play svg { width: 48px; height: 34px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
  .project-card:hover .yt-play { opacity: 1; transform: scale(1.1); }
  .proj-content {
    padding: 14px 16px 16px;
  }
  .proj-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
    margin-bottom: 4px;
  }
  .proj-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

  /* photo board — floating collage, breaks out to fill the viewport */
  #gallery { border-bottom: none; }
  .collage-wrap {
    position: relative;
    height: 660px;
    width: calc(100vw - 204px);
    max-width: 1460px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--collage-bg);
    transition: background 0.35s;
  }
  .collage-bg-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: clamp(60px, 10vw, 130px);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--fg);
    opacity: 0.06;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
  }
  .collage-slots { position: absolute; inset: 0; padding: 20px; }
  .img-slot {
    position: absolute;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border2);
    cursor: pointer;
    translate: 0 0;
    rotate: var(--rot, 0deg);
    animation: slotFloat var(--float-dur, 7s) ease-in-out var(--float-delay, 0s) infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  @keyframes slotFloat {
    0%, 100% { translate: 0 0;      rotate: calc(var(--rot, 0deg) - 1.4deg); }
    50%      { translate: 0 -13px;  rotate: calc(var(--rot, 0deg) + 1.4deg); }
  }
  .img-slot:nth-child(2n) { --float-dur: 8.5s; --float-delay: -2.2s; }
  .img-slot:nth-child(3n) { --float-dur: 9.5s; --float-delay: -4.5s; }
  .img-slot:nth-child(5n) { --float-dur: 6.5s; --float-delay: -1.3s; }
  .img-slot:hover {
    animation-play-state: paused;
    rotate: 0deg;
    transform: scale(1.09);
    z-index: 10;
    box-shadow: 0 18px 44px rgba(0,0,0,0.25);
  }
  .img-slot img,
  .img-slot video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .s2  { width:280px; height:185px; top:15px;  left:2%;  --rot: 3deg;    z-index:5; }
  .s3  { width:175px; height:175px; top:225px; left:5%;  --rot: -4.5deg; z-index:6; }
  .s4  { width:235px; height:195px; top:35px;  left:36%;  --rot: 2.5deg;  z-index:4; }
  .s5  { width:180px; height:240px; top:200px; left:30%;  --rot: -3deg;   z-index:7; }
  .s6  { width:255px; height:160px; top:15px;  left:55%;  --rot: 1.5deg;  z-index:3; }
  .s7  { width:155px; height:195px; top:220px; left:54%;  --rot: -5.5deg; z-index:8; }
  .s8  { width:215px; height:165px; top:30px;  right:3%;  --rot: 4deg;    z-index:2; }
  .s9  { width:175px; height:240px; top:195px; right:1%;  --rot: -2.5deg; z-index:6; }
  .s10 { width:265px; height:165px; top:400px; left:2%;   --rot: 2.5deg;  z-index:9; }
  .s11 { width:190px; height:240px; top:370px; left:25%;  --rot: -3.5deg; z-index:5; }
  .s12 { width:230px; height:155px; top:390px; left:48%;  --rot: 2deg;    z-index:7; }
  .s13 { width:165px; height:210px; top:380px; right:2%;  --rot: -4deg;   z-index:4; }
  .s14 { width:245px; height:160px; top:395px; left:66%;  --rot: 3deg;    z-index:8; }
  .img-slot[data-label]::after {
    content: attr(data-label);
    position: absolute;
    bottom: 7px; left: 8px;
    font-family: 'Caveat', cursive;
    font-size: 17px;
    line-height: 1.1;
    color: #fff;
    background: rgba(10,10,10,0.62);
    padding: 2px 9px 4px;
    border-radius: 3px;
    transform: rotate(-2deg);
    pointer-events: none;
    z-index: 2;
    max-width: calc(100% - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  @media (prefers-reduced-motion: reduce) {
    .img-slot { animation: none; }
  }

  /* profile photo */
  .profile-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    display: block;
  }

  /* now widget */
  .now-widget {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--surface);
  }
  .now-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
  }
  .now-key {
    color: var(--subtle);
    width: 64px;
    flex-shrink: 0;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .now-val { color: var(--muted); }
  .now-val strong { color: var(--fg); font-weight: 500; }
  .now-val a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
  .now-pulse {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent1);
    box-shadow: 0 0 5px var(--accent1);
    animation: pulse 2s ease infinite;
    flex-shrink: 0;
  }

  /* hobbies */
  .hobbies-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .hobby-block-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--subtle);
    margin-bottom: 12px;
  }
  .hobby-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }
  .hobby-pill {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
    color: var(--muted);
    transition: border-color 0.2s, color 0.2s;
  }
  .hobby-pill:hover { border-color: var(--muted); color: var(--fg); }
  .hobby-pill.active {
    border-color: var(--fg);
    color: var(--fg);
  }
  .travel-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
  }
  .travel-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 48px;
    font-weight: 900;
    color: var(--fg);
    line-height: 1;
  }
  .travel-label { font-size: 12px; color: var(--muted); }
  footer {
    padding: 40px 0 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .footer-left { font-size: 12px; color: var(--subtle); }
  .footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
  }
  .footer-links a {
    color: var(--subtle);
    display: flex;
    align-items: center;
    transition: color 0.2s;
  }
  .footer-links a:hover { color: var(--fg); }
  .footer-links svg { width: 16px; height: 16px; fill: currentColor; }
  .avail-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #3ddc84;
    box-shadow: 0 0 5px rgba(61,220,132,0.5);
    flex-shrink: 0;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  /* hobbies overlay page */
  #hobbies-page {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--bg);
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    padding: 32px 48px 32px 180px;
    display: flex;
    flex-direction: column;
  }
  #hobbies-page.open { transform: translateX(0); }
  .hobbies-top-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
  }
  #hobbies-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 100px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
  }
  #hobbies-back:hover { color: var(--fg); border-color: var(--muted); }
  .hobbies-page-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--fg);
  }
  .hobbies-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    min-height: 0;
  }
  /* with an odd card count, stretch the last card across the bottom row */
  .hobby-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .hobby-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    min-height: 0;
  }
  .hobby-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
  }
  .hobby-card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--fg);
  }
  .hobby-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    color: #000;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
  }
  .hobby-tag.yellow { background: var(--accent3); }
  .hobby-tag.teal   { background: var(--accent2); }
  .hobby-tag.orange { background: var(--accent1); }
  .hobby-tag.green  { background: var(--accent4); }
  .hobby-card-media {
    flex: 1;
    display: grid;
    gap: 1px;
    background: var(--border);
    min-height: 0;
    overflow: hidden;
  }
  .hobby-card-media.cols-1 { grid-template-columns: 1fr; }
  .hobby-card-media.cols-2 { grid-template-columns: 1fr 1fr; }
  .hobby-card-media.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .hobby-card-slot {
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
    position: relative;
  }
  .hobby-card-slot img,
  .hobby-card-slot video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
  }
  .hobby-card-slot .slot-hint {
    font-size: 9px;
    color: var(--subtle);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  /* scrollbar */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--surface); }
  ::-webkit-scrollbar-thumb { background: var(--subtle); border-radius: 3px; }

  /* fade-in on load */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .fade-up { animation: fadeUp 0.7s ease forwards; opacity: 0; }
  .d1 { animation-delay: 0.05s; }
  .d2 { animation-delay: 0.15s; }
  .d3 { animation-delay: 0.25s; }
  .d4 { animation-delay: 0.35s; }
  .d5 { animation-delay: 0.5s; }

  /* sync rate readout */
  #scroll-counter {
    position: fixed;
    bottom: 32px; right: 20px;
    z-index: 200;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--subtle);
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    transition: color 0.35s;
  }
  #scroll-counter .sync-label { opacity: 0.55; }
  #sync-val {
    color: var(--fg);
    transition: color 0.35s, opacity 0.2s;
  }
  #sync-val.maxed { color: #00b060; }
  [data-theme="eva"] #scroll-counter { color: #50308a; }
  [data-theme="eva"] #sync-val       { color: #00e86e; }

  /* scroll reveal */
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.visible { opacity: 1; transform: none; }

  /* mobile nav */
  #hamburger {
    display: none;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: calc(env(safe-area-inset-left, 0px) + 16px);
    z-index: 9300;
    background: color-mix(in srgb, var(--bg) 55%, transparent);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    transition: border-color 0.2s;
  }
  #hamburger span {
    display: block;
    width: 20px; height: 1.5px;
    background: var(--fg);
    transition: transform 0.3s, opacity 0.2s;
  }
  #hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  #hamburger.open span:nth-child(2) { opacity: 0; }
  #hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  #mobile-nav {
    display: none;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 62px);
    left: 16px;
    right: 16px;
    width: auto;
    height: auto;
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
    justify-content: flex-start;
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: 14px;
    z-index: 9200;
    flex-direction: column;
    align-items: stretch;
    padding: 4px 0;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    min-width: 0;
  }
  #mobile-nav.open { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }
  #mobile-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 14px 18px;
    transition: color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
  }
  #mobile-nav a:last-child { border-bottom: none; }
  #mobile-nav a:hover, #mobile-nav a:active { color: var(--fg); background: rgba(255,255,255,0.04); }
  #mobile-nav .nav-num { font-family: 'Space Mono', monospace; font-size: 10px; opacity: 0.4; flex-shrink: 0; }
  #mobile-nav .nav-text { flex: 1; }

  /* uav intercept easter egg */
  #uav {
    position: fixed;
    top: 0; left: 0;
    z-index: 190;
    width: 100px; height: 40px;
    padding: 8px;
    box-sizing: content-box;
    opacity: 0.9;
    cursor: crosshair;
  }
  #uav canvas {
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.35));
  }
  #uav .uav-b {
    position: absolute;
    width: 8px; height: 8px;
    border: 0 solid #ff3355;
    opacity: 0;
    transition: opacity 0.1s;
  }
  #uav .uav-b:nth-of-type(1) { top: -6px;    left: -6px;  border-width: 1.5px 0 0 1.5px; }
  #uav .uav-b:nth-of-type(2) { top: -6px;    right: -6px; border-width: 1.5px 1.5px 0 0; }
  #uav .uav-b:nth-of-type(3) { bottom: -6px; left: -6px;  border-width: 0 0 1.5px 1.5px; }
  #uav .uav-b:nth-of-type(4) { bottom: -6px; right: -6px; border-width: 0 1.5px 1.5px 0; }
  #uav.locked { color: #ff3355; opacity: 1; }
  #uav.locked .uav-b { opacity: 1; }
  #uav.locked::after {
    content: 'LOCK';
    position: absolute;
    top: -18px; left: 50%;
    transform: translateX(-50%);
    font: 700 7px 'Space Mono', monospace;
    letter-spacing: 0.25em;
    color: #ff3355;
  }
  #uav-count {
    opacity: 0;
    transition: opacity 0.5s;
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    left: calc(env(safe-area-inset-left, 0px) + 14px);
    z-index: 190;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--subtle);
    pointer-events: none;
  }
  #uav-count.show { opacity: 1;
  }
  .uav-bit {
    position: fixed;
    z-index: 191;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #ff3355;
    pointer-events: none;
    animation: uavBit 0.7s ease-out forwards;
  }
  @keyframes uavBit {
    to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(140deg); }
  }

  /* scroll-driven (pure css, progressive enhancement) */
  #scroll-progress { display: none; }
  @supports (animation-timeline: scroll()) {
    #scroll-progress {
      display: block;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 2px;
      background: var(--accent1);
      transform-origin: 0 50%;
      transform: scaleX(0);
      z-index: 9100;
      animation: growProgress linear both;
      animation-timeline: scroll(root);
      pointer-events: none;
    }
    @keyframes growProgress {
      from { transform: scaleX(0); }
      to   { transform: scaleX(1); }
    }
  }

  /* tactile: paper grain */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  /* status pill */
  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 7px 15px;
    margin-bottom: 26px;
  }

  /* receipts — proof under the tagline */
  .receipts {
    margin-top: 18px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 8px;
  }
  .receipts p {
    font-family: 'Space Mono', monospace;
    font-size: 12.5px;
    line-height: 2.1;
    color: var(--muted);
  }
  .receipts strong { color: var(--fg); font-weight: 600; }
  .receipts .rc-dim { color: var(--subtle); }
  .chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 8px 1px 4px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--fg);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    vertical-align: -3px;
  }
  .chip img {
    width: 15px; height: 15px;
    border-radius: 4px;
    display: block;
  }

  /* github tile — fills the grid's odd slot */
  .gh-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 240px;
    text-decoration: none;
    color: var(--muted);
    background: none;
    border: 1.5px dashed var(--border);
    box-shadow: none;
  }
  .gh-tile:hover {
    color: var(--accent1);
    border-color: var(--accent1);
    box-shadow: none;
  }
  .gh-tile-text {
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
  }
  .gh-tile-text strong { color: var(--fg); font-weight: 600; }
  .gh-tile:hover .gh-tile-text strong { color: var(--accent1); }

  /* project explorer — list + live preview */
  .proj-explorer {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 360px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
  }
  .proj-list { display: flex; flex-direction: column; }
  .proj-row {
    display: grid;
    grid-template-columns: 128px 1fr 18px;
    align-items: baseline;
    gap: 12px;
    padding: 16px 22px;
    text-decoration: none;
    border-bottom: 1px solid var(--border2);
    transition: background 0.15s;
  }
  .proj-row:last-child { border-bottom: none; }
  .proj-row-name { font-size: 14px; font-weight: 600; color: var(--fg); }
  .proj-row-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
  .proj-row-arrow { font-size: 13px; color: var(--accent1); opacity: 0; transition: opacity 0.15s; }
  .proj-row:hover, .proj-row.active { background: color-mix(in srgb, var(--accent1) 6%, transparent); }
  .proj-row.active .proj-row-arrow { opacity: 1; }
  .proj-preview {
    position: relative;
    min-height: 300px;
    background: #0b0d14;
    cursor: pointer;
  }
  .proj-preview img,
  .proj-preview video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .proj-preview-label {
    position: absolute;
    top: 10px; left: 10px;
    z-index: 2;
    font-size: 11px;
    color: #fff;
    background: rgba(10,10,10,0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 100px;
    pointer-events: none;
  }
  .proj-preview-hint {
    position: absolute;
    bottom: 12px; right: 12px;
    z-index: 2;
    font-size: 11px;
    color: #fff;
    background: rgba(10,10,10,0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 100px;
    pointer-events: none;
  }

  /* experience: earlier-roles expander */
  .exp-more-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 0;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--subtle);
    cursor: pointer;
    transition: color 0.2s;
    text-align: left;
  }
  .exp-more-toggle:hover { color: var(--fg); }
  .exp-more-plus {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    transition: transform 0.3s ease;
  }
  .exp-more-toggle.open .exp-more-plus { transform: rotate(45deg); }
  .exp-more {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
  }
  .exp-more.open { grid-template-rows: 1fr; }
  .exp-more-inner { overflow: hidden; }
  .exp-more-inner .exp-row:first-child { border-top: 1px solid var(--border); }

  /* project l.a.r.p. — layered clip deck */
  .larp-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 340px;
  }
  .larp-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 26px 20px;
    background:
      radial-gradient(ellipse at 30% 20%, rgba(63,99,214,0.18), transparent 60%),
      #0b0d14;
  }
  .larp-deck {
    position: relative;
    width: 158px;
    aspect-ratio: 9/16;
  }
  .larp-deck::before,
  .larp-deck::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: #181b26;
    border: 1px solid rgba(255,255,255,0.09);
  }
  .larp-deck::before { transform: rotate(-6deg) translate(-9px, 4px); }
  .larp-deck::after  { transform: rotate(4deg) translate(9px, 2px); }
  .larp-deck video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 14px 40px rgba(0,0,0,0.55);
    background: #000;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  .larp-deck.swapping video { transform: rotate(2.5deg) scale(0.94); opacity: 0; }
  #larp-sound {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 100px;
    padding: 5px 13px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
  }
  #larp-sound:hover { color: #fff; }
  #larp-sound.on { color: #0b0d14; background: #fff; border-color: #fff; }
  .larp-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 26px 30px;
  }
  .larp-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .larp-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 40px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1;
    color: var(--fg);
  }
  .larp-sub { font-size: 13px; color: var(--muted); }
  .larp-clips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
  .larp-clips button {
    font-family: 'Space Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 7px 15px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
  }
  .larp-clips button:hover { color: var(--fg); border-color: var(--muted); }
  .larp-clips button.active {
    color: #fff;
    background: var(--accent1);
    border-color: var(--accent1);
  }

  /* shinji buddy */
  #shinji-buddy {
    position: absolute;
    top: 0;
    right: 13%;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    animation: shinjiSwing 4.5s ease-in-out infinite alternate;
    cursor: pointer;
    user-select: none;
  }
  @keyframes shinjiSwing {
    from { rotate: 2.5deg; }
    to   { rotate: -2.5deg; }
  }
  #shinji-string {
    width: 1.5px;
    height: 56px;
    background: var(--subtle);
    opacity: 0.55;
  }
  #shinji-buddy img {
    width: 66px; height: 66px;
    display: block;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.18));
  }
  #shinji-say {
    position: absolute;
    top: 48px;
    right: 72px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    border-bottom-right-radius: 2px;
    padding: 5px 11px;
    font-size: 12px;
    color: var(--fg);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  }
  [data-theme="eva"] #shinji-string {
    background: #00e86e;
    opacity: 0.85;
    box-shadow: 0 0 6px rgba(0,232,110,0.6);
  }
  [data-theme="eva"] #shinji-buddy img {
    filter: drop-shadow(0 3px 8px rgba(0,232,110,0.35));
  }
  #shinji-buddy.talking #shinji-say { opacity: 1; transform: none; }
  #shinji-note {
    font-family: 'Caveat', cursive;
    font-size: 14px;
    color: var(--muted);
    transform: rotate(-5deg);
    margin-top: 5px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
  }
  #shinji-buddy:hover #shinji-note { opacity: 1; }
  #shinji-buddy.talking #shinji-note { opacity: 0 !important; }
  @media (max-width: 700px) {
    #shinji-buddy { right: 28%; }
    #shinji-buddy img { width: 52px; height: 52px; }
    #shinji-string { height: 40px; }
  }
  @media (prefers-reduced-motion: reduce) {
    #shinji-buddy { animation: none; }
  }

  /* tactile: handwritten eva toggle hint */
  #eva-hint {
    font-family: 'Caveat', cursive;
    font-size: 15px;
    color: var(--muted);
    transform: rotate(-4deg);
    margin-top: 2px;
    user-select: none;
    white-space: nowrap;
    transition: opacity 0.4s;
  }
  #eva-hint { opacity: 0; }
  #eva-toggle-wrap:hover #eva-hint { opacity: 1; }
  #eva-hint.gone { opacity: 0 !important; }
  [data-theme="eva"] #eva-hint { display: none; }

  /* mobile */
  @media (max-width: 700px) {
    nav { display: none; }
    #hamburger { display: flex; }
    #mobile-nav { display: flex; }
    #ascii-donut { display: none !important; }
    #scroll-counter { display: none; }
    #turret, #turret-beam { display: none !important; }
    #crumb { display: none; }
    .hero-name-row { overflow: hidden; }
    main { margin-left: 0; padding: 0 20px; }
    section { padding: 42px 0; }
    #me { padding-top: 84px; }
    .bio { grid-template-columns: 1fr; gap: 24px; }
    .exp-date { display: none; }
    .collage-wrap { height: auto; width: auto; max-width: none; }
    .collage-bg-text { display: none; }
    .collage-slots {
      position: static;
      padding: 10px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .img-slot {
      position: relative !important;
      top: auto !important; left: auto !important; right: auto !important;
      width: 100% !important;
      height: 140px !important;
      transform: none !important;
      animation: none;
      border-radius: 8px !important;
    }
    .img-slot:hover { transform: none !important; }
    .projects-grid { grid-template-columns: 1fr; }
    .proj-explorer { grid-template-columns: 1fr; }
    .proj-preview { order: -1; min-height: 0; aspect-ratio: 16/9; }
    .proj-row { grid-template-columns: 1fr 18px; padding: 13px 16px; }
    .proj-row-desc { grid-column: 1 / -1; }
    .larp-layout { grid-template-columns: 1fr; }
    .larp-stage { padding: 22px 16px; }
    .larp-panel { padding: 20px 18px 24px; }
    .larp-title { font-size: 32px; }

    /* hobbies overlay page — single column scrollable on mobile */
    #hobbies-page {
      padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px calc(env(safe-area-inset-bottom, 0px) + 16px) 14px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    .hobbies-grid {
      grid-template-columns: 1fr;
      grid-template-rows: auto;
      flex: none;
      gap: 10px;
    }
    .hobby-card-media {
      height: 200px;
      flex: none;
    }
    #hobbies-video {
      object-fit: contain !important;
      background: #000;
    }
    .hobby-card-header {
      padding: 8px 12px;
    }
    .hobby-card-title {
      font-size: 16px;
    }
    .hobbies-page-label {
      font-size: 26px;
    }
    .hobbies-top-bar { margin-bottom: 10px; }
  }

/* eva hud chrome */
#eva-hud {
  position: fixed;
  inset: 14px;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transition: opacity 0.6s ease;
}
[data-theme="eva"] #eva-hud { opacity: 1; }
.hud-label {
  position: absolute;
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #50308a;
  white-space: nowrap;
}
.hud-label.hl-top { top: -3px; left: 50%; translate: -50% 0; }
.hud-label.hl-side {
  right: -4px; top: 50%;
  writing-mode: vertical-rl;
  translate: 0 -50%;
  font-size: 12px;
  letter-spacing: 0.6em;
  color: rgba(0,232,110,0.45);
}
.hud-label.hl-bottom { bottom: -3px; left: 50%; translate: -50% 0; }
[data-theme="eva"] .exp-logo,
[data-theme="eva"] .chip img {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  border-radius: 0;
}
@media (max-width: 700px) {
  .hud-label.hl-side { display: none; }
}

/* magi hex clusters (eva hud layer) — small interlocked cells like the show */
.hexc { position: absolute; }
.hex {
  position: absolute;
  width: 92px; height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 88'%3E%3Cpolygon points='25,1.5 75,1.5 98.5,44 75,86.5 25,86.5 1.5,44' fill='none' stroke='rgba(139,63,255,0.30)' stroke-width='1.6'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  font-family: 'Space Mono', monospace;
  font-size: 7.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(139,63,255,0.55);
  text-align: center;
}
.hex.fill {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 88'%3E%3Cpolygon points='25,1.5 75,1.5 98.5,44 75,86.5 25,86.5 1.5,44' fill='rgba(139,63,255,0.07)' stroke='rgba(139,63,255,0.20)' stroke-width='1.6'/%3E%3C/svg%3E");
}
.hex.dark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 88'%3E%3Cpolygon points='25,1.5 75,1.5 98.5,44 75,86.5 25,86.5 1.5,44' fill='rgba(0,0,0,0.4)' stroke='rgba(139,63,255,0.25)' stroke-width='1.6'/%3E%3C/svg%3E");
}
.hex.warn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 88'%3E%3Cpolygon points='25,1.5 75,1.5 98.5,44 75,86.5 25,86.5 1.5,44' fill='rgba(255,51,85,0.05)' stroke='rgba(255,51,85,0.38)' stroke-width='1.6'/%3E%3C/svg%3E");
  color: rgba(255,51,85,0.6);
}
.hex b { font-weight: 700; font-size: 12px; letter-spacing: 0.08em; }
.hex .tri { font-size: 7px; letter-spacing: 0; line-height: 1; }

/* interlocked offsets: x step 69px, y step 40px (hex 92x80, flat-top) */
.hexc-a { top: 12%; right: 2.5%; width: 300px; height: 200px; }
.hexc-a .h1 { left: 0;     top: 40px; }
.hexc-a .h2 { left: 69px;  top: 0; }
.hexc-a .h3 { left: 69px;  top: 80px; }
.hexc-a .h4 { left: 138px; top: 40px; }
.hexc-a .h5 { left: 138px; top: 120px; }
.hexc-a .h6 { left: 207px; top: 80px; }
.hexc-b { bottom: 7%; left: 1.5%; width: 232px; height: 160px; }
.hexc-b .h1 { left: 0;     top: 40px; }
.hexc-b .h2 { left: 69px;  top: 0; }
.hexc-b .h3 { left: 69px;  top: 80px; }
.hexc-b .h4 { left: 138px; top: 40px; }
.hex-s1 { top: 46%; right: 11%; }
.hex-s2 { top: 34%; left: 4%; width: 64px; height: 56px; }
@media (max-width: 900px) {
  .hexc-b, .hex-s1, .hex-s2 { display: none; }
  .hexc-a { transform: scale(0.62); transform-origin: top right; }
}

/* corner turret — ciws mount on the geofront floor, tracks the cursor in eva mode */
#turret {
  display: none;
  position: fixed;
  left: 14px; bottom: 8px;
  z-index: 140;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
[data-theme="eva"] #turret { display: flex; }
#turret .t-line { stroke: rgba(139,63,255,0.55); }
#turret .t-fill { fill: #0d0620; }
#turret-hub { fill: #00e86e; animation: hubPulse 2.2s ease-in-out infinite; }
@keyframes hubPulse { 50% { opacity: 0.35; } }
#turret-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
  color: #50308a;
}
#turret-mode.lock { color: #00e86e; }
#turret-beam {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh;
  z-index: 139;
  pointer-events: none;
}
[data-theme="eva"] #turret-beam.on { display: block; }
#turret-beam line {
  stroke: rgba(0,232,110,0.5);
  stroke-width: 1;
  stroke-dasharray: 7 6;
  animation: beamFlow 0.5s linear infinite;
}
@keyframes beamFlow { to { stroke-dashoffset: -13; } }
@media (pointer: coarse) {
  #turret, #turret-beam { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  #turret-hub { animation: none; }
  #turret-beam line { animation: none; }
}
#turret-beam-tgt {
  fill: none;
  stroke: rgba(0,232,110,0.75);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: tgtSpin 3.2s linear infinite;
}
@keyframes tgtSpin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  #turret-beam-tgt { animation: none; }
}

/* notion-style page meta under the name */
.page-meta {
  font-size: 12px;
  color: var(--subtle);
  margin: -16px 0 24px;
}

/* slash-command menu — notion-style block jumper */
#slash-menu {
  position: fixed;
  top: 22vh;
  left: 50%;
  translate: -50% 0;
  z-index: 9500;
  width: 330px;
  max-width: calc(100vw - 32px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.08);
  padding: 6px;
  display: none;
}
#slash-menu.open { display: block; }
.slash-head {
  padding: 6px 10px 5px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
}
.slash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--fg);
  cursor: pointer;
}
.slash-item .si-icon { width: 20px; font-size: 14px; text-align: center; }
.slash-item .si-hint { margin-left: auto; font-size: 11px; color: var(--subtle); }
.slash-item.sel { background: var(--surface); }
.slash-empty { padding: 10px; font-size: 12px; color: var(--subtle); }

/* eva mode: the kill tally lives on the turret readout instead of the corner badge */
@media (pointer: fine) {
  [data-theme="eva"] #uav-count { display: none; }
}

/* live breadcrumb — notion top bar (light mode only) */
#crumb {
  position: fixed;
  top: 14px;
  left: 28px;
  z-index: 150;
  font-size: 12px;
  color: var(--subtle);
}
#crumb .crumb-sep { margin: 0 7px; opacity: 0.5; }
#crumb #crumb-page { color: var(--muted); }
[data-theme="eva"] #crumb { display: none; }

/* guest cursor cameo — figma-style visitor, once per session */
#guest-cursor {
  position: fixed;
  z-index: 9400;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s;
}
#guest-cursor.here { opacity: 1; }
#guest-cursor svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25)); }
#guest-cursor .gc-name {
  position: absolute;
  top: 18px; left: 12px;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px 10px 10px 10px;
  background: var(--accent1);
  color: #fff;
  white-space: nowrap;
}
#guest-cursor .gc-react {
  position: absolute;
  top: -6px; left: 18px;
  font-size: 16px;
  opacity: 0;
}
#guest-cursor .gc-react.pop { animation: gcPop 1.6s ease forwards; }
@keyframes gcPop {
  0%   { opacity: 0; translate: 0 6px;   scale: 0.6; }
  20%  { opacity: 1; translate: 0 -4px;  scale: 1.15; }
  40%  { scale: 1; }
  100% { opacity: 0; translate: 0 -26px; scale: 1; }
}
