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

/* Self-hosted terminal fonts. JetBrainsMono Nerd Font carries the base mono
   glyphs PLUS box-drawing, block elements, Powerline and Nerd icons (so zsh /
   powerlevel10k prompts and btop's bars render instead of tofu). It has no
   Braille block, which btop's graphs use, so a tiny monospace Braille subset is
   layered after it as a per-glyph fallback. */
@font-face{font-family:'JetBrainsMono Nerd Font';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/JetBrainsMonoNF-Regular.woff2') format('woff2')}
@font-face{font-family:'JetBrainsMono Nerd Font';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/JetBrainsMonoNF-Bold.woff2') format('woff2')}
@font-face{font-family:'Terminal Braille';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/TerminalBraille.woff2') format('woff2')}
:root{--term-font:'JetBrainsMono Nerd Font','JetBrains Mono','Terminal Braille',monospace}

body{background:#1e1e2e;color:#cdd6f4;font-family:var(--term-font);font-size:14px;line-height:1.7;padding:56px 24px 96px}
.wrap{max-width:1100px;margin:0 auto}
.term-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.head-divider{border:none;border-top:1px solid rgba(108,112,134,0.25);margin:0 0 32px}
.term-prompt{font-size:15px;font-weight:700}
.prompt-user{color:#89b4fa}.prompt-sep{color:#6c7086}.prompt-host{color:#cdd6f4}
.cursor{display:inline-block;width:9px;height:1.1em;background:#89b4fa;vertical-align:text-bottom;margin-left:2px;animation:blink 1.1s step-end infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}
.ascii-wrap{overflow-x:auto;margin-bottom:8px;text-align:center}
.ascii{color:#89b4fa;font-size:13px;line-height:1.2;white-space:pre;display:inline-block;font-family:'JetBrains Mono',monospace}
.section-head{display:flex;align-items:center;gap:10px;color:#6c7086;font-size:12px;margin-bottom:24px}
.section-head::after{content:'';flex:1;border-top:1px solid rgba(108,112,134,0.25)}
.cmd-line{font-size:14px;margin-bottom:10px}
.cmd-dollar{color:#89b4fa}
.whoami-result{font-size:18px;font-weight:700;color:#89b4fa;margin-bottom:16px}
/* shared block that matches the terminal surface */
.term-block{background:#181825;border:1px solid rgba(108,112,134,0.2);border-radius:8px;padding:16px 18px;margin-bottom:52px;overflow-x:auto}
.about{margin-bottom:52px;line-height:1.9;color:rgba(205,214,244,0.85)}
.about.term-block{line-height:1.85}
.about a{color:#cdd6f4;text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(137,180,250,0.35)}
.about a:hover{color:#89b4fa}
#bsky-posts{display:flex;flex-direction:column;margin-bottom:52px}
.post-entry{position:relative;padding:14px 0;border-bottom:1px solid rgba(108,112,134,0.12);cursor:pointer;max-width:100%}
.post-entry:last-child{border-bottom:none}
.post-entry:hover .post-entry-text{color:#cdd6f4}
.post-entry-header{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.post-avatar{width:22px;height:22px;border-radius:50%;border:1px solid rgba(137,180,250,0.35);object-fit:cover;flex-shrink:0}
.post-handle{color:#89b4fa;font-size:12px;font-weight:700}
.post-entry-date{color:#6c7086;font-size:11px;margin-left:auto}
.post-json-btn{margin-left:8px;background:transparent;border:1px solid rgba(137,180,250,0.25);color:#89b4fa;border-radius:4px;font-family:inherit;font-size:10px;padding:1px 6px;cursor:pointer;flex-shrink:0;line-height:1.4;-webkit-tap-highlight-color:transparent}
.post-json-btn:hover{background:rgba(137,180,250,0.1)}
.post-json-btn.active{background:rgba(137,180,250,0.15);color:#cba6f7;border-color:rgba(203,166,247,0.4)}
.post-json{display:none;margin-top:10px;padding:12px 14px;background:#11111b;border:1px solid rgba(108,112,134,0.2);border-radius:6px;font-family:'JetBrains Mono',monospace;font-size:11.5px;line-height:1.55;white-space:pre;overflow-x:auto;color:#cdd6f4;cursor:text;max-width:100%}
.post-json.open{display:block}
.post-entry-text{color:rgba(205,214,244,0.8);white-space:pre-wrap;word-break:break-word;line-height:1.6;font-size:13px}
.media-container{margin-top:10px;border-radius:4px;overflow:hidden;border:1px solid rgba(137,180,250,0.15);background:rgba(17,17,27,0.3);max-width:480px}
.media-wrapper{width:100%;height:100%;overflow:hidden}
.post-image,.post-video{width:100%;height:100%;object-fit:cover;object-position:center;display:block;cursor:zoom-in}
.grid-1 .media-wrapper{aspect-ratio:16/9;max-height:280px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:3px;aspect-ratio:2/1}
.grid-3{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:3px;aspect-ratio:1.7/1}
.grid-3 .media-wrapper:nth-child(1){grid-row:1/span 2}
.grid-4{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:3px;aspect-ratio:1.5/1}
.post-image.expanded,.post-video.expanded{position:absolute;top:10px;left:10px;width:calc(100% - 20px)!important;height:calc(100% - 20px)!important;max-height:none!important;object-fit:contain!important;background:rgba(17,17,27,0.98);border-radius:8px;border:1px solid rgba(137,180,250,0.4);z-index:100;cursor:zoom-out;opacity:0;transform:scale(0.96);animation:smoothZoom .25s cubic-bezier(.16,1,.3,1) forwards}
.post-video:fullscreen,.post-video:-webkit-full-screen,.post-video:-moz-full-screen,.post-video:-ms-fullscreen{position:static!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;transform:none!important;animation:none!important}
@keyframes smoothZoom{to{opacity:1;transform:scale(1)}}
.quote-container{position:relative;margin-top:10px;padding:8px 10px;border-left:2px solid rgba(137,180,250,0.35);background:rgba(137,180,250,0.04);border-radius:0 3px 3px 0}
.quote-container .post-image.expanded,.quote-container .post-video.expanded{top:5px;left:5px;width:calc(100% - 10px)!important;height:calc(100% - 10px)!important}
.quote-author{display:flex;align-items:center;gap:6px;margin-bottom:4px}
.quote-author img{width:16px;height:16px;border-radius:50%}
.quote-author span{font-size:11px;font-weight:700;color:#89b4fa}
.quote-text{font-size:12px;color:rgba(205,214,244,0.65);white-space:pre-wrap}
.btc-block{cursor:pointer;display:inline-flex;flex-direction:column;gap:5px;padding:16px 20px;border:1px solid rgba(137,180,250,0.18);border-radius:4px;transition:border-color .2s;margin-bottom:52px}
.btc-block:hover{border-color:rgba(137,180,250,0.45)}
.btc-block.copied{border-color:rgba(166,227,161,0.45)}
.btc-addr{color:rgba(205,214,244,0.45);font-size:12px;word-break:break-all}
.btc-block.copied .btc-addr{color:#a6e3a1}
.btc-hint{color:#6c7086;font-size:11px}
.btc-block.copied .btc-hint{color:#a6e3a1}
/* terminal */
.mini-term{border:1px solid rgba(108,112,134,0.2);border-radius:8px;overflow:hidden}
.mini-term-bar{position:relative;background:#313244;border-bottom:1px solid rgba(205,214,244,0.07);height:34px;display:flex;align-items:center;justify-content:center;user-select:none}
.mini-term-bar-title{color:#a6adc8;font-size:12px}
.mt-fs-btn{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;border:none;color:#6c7086;font-size:14px;line-height:1;padding:4px 6px;cursor:pointer;border-radius:4px;-webkit-tap-highlight-color:transparent}
.mt-fs-btn:hover{color:#cdd6f4;background:rgba(205,214,244,0.08)}
/* one scroll surface holds both the output history and the live prompt, so the
   input line sits at the bottom of the content and scrolls with it (a normal terminal) */
.mini-term-body{background:#181825;min-height:80px;max-height:454px;overflow-y:auto}
.mini-term-output{padding:12px 16px 0;line-height:1.65;font-size:13px}
.mt-line{min-height:1.65em;word-break:break-word;white-space:pre-wrap}
.mt-ps1-line{display:flex;gap:8px}
.mt-ps1{color:#89b4fa;white-space:nowrap;flex-shrink:0}
.mt-ca{color:#89b4fa}.mt-cm{color:#6c7086}.mt-ce{color:#f38ba8}.mt-cg{color:#a6e3a1}.mt-cy{color:#f9e2af}
/* JSON syntax highlighting (jq / curl) */
.json-key{color:#89b4fa}.json-str{color:#a6e3a1}.json-num{color:#fab387}.json-bool{color:#cba6f7}.json-null{color:#f38ba8}.json-punc{color:#6c7086}
/* command-line syntax highlighting (zsh-syntax-highlighting / p10k style) */
.hl-cmd{color:#a6e3a1}.hl-cmd-bad{color:#f38ba8}.hl-flag{color:#fab387}.hl-str{color:#f9e2af}.hl-op{color:#94e2d5}.hl-special{color:#cba6f7}.hl-arg{color:#cdd6f4}.hl-path{color:#89b4fa;text-decoration:underline}
.mini-term-input-row{background:#181825;display:flex;align-items:center;gap:0;padding:0 16px 12px}
.mt-ps1-input{color:#89b4fa;white-space:nowrap;flex-shrink:0;user-select:none;font-size:13px;margin-right:8px}
#mt-input{flex:1;min-width:0;background:transparent;border:none;color:transparent;font-family:inherit;font-size:13px;outline:none;caret-color:transparent;line-height:1.55}
#mt-input.mt-composing{color:#cdd6f4;caret-color:#89b4fa}
#mt-input::placeholder{color:#45475a}
.mt-overlay{position:absolute;left:0;top:50%;transform:translateY(-50%);pointer-events:none;white-space:pre;line-height:1.55;font-family:inherit;font-size:13px}
.input-wrapper{overflow:hidden}
#mt-hl{z-index:0}
#mt-hl.mt-hide{visibility:hidden}
#mt-measure{position:absolute;visibility:hidden;left:0;top:0;white-space:pre;font-family:inherit;font-size:13px;line-height:1.55}
#mt-cursor{position:absolute;top:50%;transform:translateY(-50%);width:8px;height:1.05em;background:#89b4fa;pointer-events:none;display:none;z-index:0;animation:blink 1.1s step-end infinite}
a{color:inherit;text-decoration:none}
a:hover{color:#89b4fa}
.col{display:inline-block}
@media(max-width:480px){body{padding:40px 16px 72px;font-size:13px}.ascii{font-size:9.5px}.post-entry{max-width:100%}.media-container{max-width:100%}}
.mt-mob-bar{display:none;align-items:center;gap:6px;padding:4px 12px 8px;background:#181825;border-top:1px solid rgba(108,112,134,0.08)}
.mt-mob-btn{background:rgba(137,180,250,0.06);color:#89b4fa;border:1px solid rgba(137,180,250,0.2);border-radius:4px;font-family:inherit;font-size:13px;padding:6px 12px;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none}
.mt-mob-btn:active{background:rgba(137,180,250,0.18)}
.mt-mob-clear{color:#6c7086;border-color:rgba(108,112,134,0.3)}
.mt-stop-bar{display:none;align-items:center;gap:10px;padding:9px 16px;background:#181825;border-top:1px solid rgba(108,112,134,0.08);font-size:13px;color:#6c7086}
.mt-stop-dot{width:8px;height:8px;border-radius:50%;background:#a6e3a1;flex-shrink:0;animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.3}}
.mt-stop-btn{margin-left:auto;background:rgba(243,139,168,0.1);color:#f38ba8;border:1px solid rgba(243,139,168,0.3);border-radius:4px;font-family:inherit;font-size:13px;padding:6px 14px;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.mt-stop-btn:active{background:rgba(243,139,168,0.25)}
@media(hover:none)and(pointer:coarse){
  .mt-mob-bar{display:flex}
  #mt-input,.mt-overlay,#mt-measure{font-size:16px}
  .term-focus-hint{display:none}
  .mini-term{touch-action:manipulation}
}
/* fullscreen / maximized terminal */
body.mt-fs-lock{overflow:hidden}
.mini-term.mt-fullscreen{position:fixed;inset:0;z-index:9999;width:100%;height:100vh;height:100dvh;max-width:none;border:none;border-radius:0;display:flex;flex-direction:column;margin:0}
.mini-term.mt-fullscreen .mini-term-body{max-height:none;flex:1 1 auto;min-height:0}
.mini-term.mt-fullscreen .mini-term-bar,
.mini-term.mt-fullscreen .mt-mob-bar,
.mini-term.mt-fullscreen .mt-stop-bar{flex-shrink:0}
