html[data-terminal-profile="cachy"] { --gold:#78c4ff; --profile-accent:#78c4ff; }
html[data-terminal-profile="arch"] { --gold:#ff8585; --profile-accent:#ff8585; }
.bar { align-items:center; }
#nav-clock { display:grid; gap:2px; min-width:104px; color:var(--muted); font:500 .7rem/1.2 var(--mono); font-variant-numeric:tabular-nums; white-space:nowrap; text-align:right; }
#nav-clock [data-clock-time] { color:var(--text); font-size:.78rem; }
#nav-clock [data-clock-date] { color:var(--muted); }
.terminal { position:fixed; z-index:20; top:50%; left:50%; display:flex; width:min(1040px,calc(100vw - 2rem)); height:min(720px,calc(100dvh - 2rem)); flex-direction:column; overflow:hidden; border:1px solid color-mix(in srgb,var(--gold) 54%,var(--line)); border-radius:10px; background:#0b0d11; color:#e9e5d9; box-shadow:0 32px 110px #000c,0 0 70px color-mix(in srgb,var(--gold) 10%,transparent); transform:translate(-50%,-50%); }
.terminal[hidden] { display:none; }
.terminal-bar { display:grid; grid-template-columns:64px minmax(0,1fr) auto auto; align-items:center; gap:14px; min-height:54px; padding:8px 16px; border-bottom:1px solid #2b303a; background:#181b21; }
.terminal-bar > strong { overflow:hidden; color:#d5d8de; font:500 .82rem/1 var(--mono); text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.terminal-controls { display:flex; align-items:center; gap:7px; }
.terminal-controls button,.terminal-controls span { display:block; width:12px; height:12px; flex:none; padding:0; border:0; border-radius:50%; background:#5a616b; }
.terminal-controls button { border:1px solid #ff958e; background:#ff625b; cursor:pointer; }
.terminal-controls button:hover { background:#ff817b; }
.terminal-controls span:first-of-type { background:#ffbd4b; }
.terminal-controls span:last-of-type { background:#35c86a; }
.terminal-profile-label { margin:0; color:#9ba2ae; font:500 .7rem var(--mono); }
.terminal-profile { max-width:min(200px,25vw); min-height:34px; padding:6px 9px; border:1px solid #3a404b; border-radius:5px; background:#101318; color:#e9e5d9; font:500 .72rem var(--mono); }
.terminal-profile:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.terminal-output { flex:1; min-height:0; overflow:auto; padding:clamp(16px,3vw,30px); background:radial-gradient(ellipse at 50% 0%,#171c24 0,transparent 66%),#0b0d11; font:500 .9rem/1.65 var(--mono); }
.terminal-output pre { max-width:100%; margin:0 0 1rem; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; }
.terminal-output .terminal-command { margin-bottom:14px; color:#aeb6c3; }
.terminal-fetch { display:grid; grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr); align-items:center; gap:clamp(18px,4vw,42px); margin:6px 0 10px; }
.terminal-output .terminal-logo { display:block; width:max-content; max-width:100%; justify-self:center; margin:0; overflow:hidden; color:var(--gold); font:500 clamp(5px,.62vw,9px)/1.22 var(--mono); text-align:left; white-space:pre; }
.terminal-logo[data-profile="arch"] { font-size:clamp(12px,1.1vw,16px); }
.terminal-fetch-info { display:grid; gap:4px; min-width:0; }
.terminal-fetch-heading { padding-bottom:9px; border-bottom:1px solid #303540; color:#f1f2f4; font-size:.9rem; }
.terminal-fetch-heading span { color:var(--gold); }
.terminal-fetch-row { display:grid; grid-template-columns:minmax(100px, .48fr) minmax(0,1fr); gap:12px; }
.terminal-fetch-row b { color:var(--gold); font-weight:500; }
.terminal-fetch-row span { min-width:0; overflow-wrap:anywhere; color:#d7d9de; }
.terminal-help { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 32px; }
.terminal-help-group { min-width:0; }
.terminal-help-group h3 { margin:0 0 8px; color:var(--gold); font:500 .76rem var(--mono); text-transform:uppercase; }
.terminal-help-row { display:grid; grid-template-columns:160px minmax(0,1fr); gap:12px; padding:3px 0; }
.terminal-help-row b { color:#f1f2f4; font-weight:500; white-space:nowrap; }
.terminal-help-row span { color:#aeb6c3; }
.terminal-prompt { display:flex; align-items:center; gap:10px; min-height:54px; padding:12px 18px; border-top:1px solid #2b303a; background:#090b0e; font:500 .85rem var(--mono); }
.terminal-prompt .prompt-text { flex:none; color:var(--gold); white-space:nowrap; }
#terminal-input { flex:1; min-width:0; padding:0; border:0; outline:0; background:transparent; color:#f1f2f4; box-shadow:none; font:inherit; }
#terminal-input:focus-visible { outline:none; }
.terminal-date { display:grid; gap:5px; max-width:100%; margin:10px 0 18px; }
.terminal-date-heading { color:var(--gold); font-size:1.18rem; line-height:1.35; }
.terminal-date-time,.terminal-date-name { margin:0; color:#d7d9de; line-height:1.6; }
.terminal-clock-panel { display:grid; grid-template-rows:auto minmax(0,1fr); min-height:clamp(220px,55vh,440px); margin:8px 0 0; background:radial-gradient(ellipse at center,color-mix(in srgb,var(--gold) 8%,transparent),transparent 68%); }
.terminal-clock-close { justify-self:end; padding:8px 4px; border:0; background:transparent; color:var(--muted); font:500 .72rem var(--mono); cursor:pointer; }
.terminal-clock-close:hover { color:var(--gold); }
.terminal-clock-close:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.terminal-output .terminal-clock { display:grid; min-height:0; place-content:center; padding-bottom:24px; color:var(--gold); font-size:clamp(3rem,16vw,9rem); line-height:1; text-align:center; font-variant-numeric:tabular-nums; }
@media(max-width:760px) {
  .bar { gap:4px 12px; }
  #nav-clock { min-width:0; }
  #nav-clock [data-clock-date] { font-size:.7rem; }
  .terminal { inset:.4rem; width:auto; height:auto; border-radius:8px; transform:none; }
  .terminal-bar { grid-template-columns:44px minmax(0,1fr) auto; gap:8px; min-height:48px; padding:7px 10px; }
  .terminal-bar > strong { font-size:.66rem; }
  .terminal-controls { gap:5px; }
  .terminal-controls button,.terminal-controls span { width:10px; height:10px; }
  .terminal-profile-label { display:none; }
  .terminal-profile { width:min(178px,48vw); max-width:178px; padding:5px 6px; font-size:.62rem; }
  .terminal-fetch { grid-template-columns:1fr; gap:16px; }
  .terminal-output .terminal-logo { font-size:clamp(5px,1.55vw,7px); }
  .terminal-logo[data-profile="arch"] { font-size:clamp(13px,3vw,16px); }
  .terminal-fetch-row { grid-template-columns:minmax(82px,.42fr) minmax(0,1fr); gap:8px; }
  .terminal-output { padding:17px 14px; font-size:.82rem; }
  .terminal-help { grid-template-columns:1fr; gap:14px; }
  .terminal-help-row { grid-template-columns:150px minmax(0,1fr); gap:8px; }
  .terminal-prompt { gap:7px; padding:11px; font-size:.72rem; }
  .terminal-clock-panel { min-height:clamp(180px,45vh,320px); }
  .terminal-output .terminal-clock { font-size:clamp(2.4rem,14vw,5rem); }
}
@media(prefers-reduced-motion:reduce) { .terminal * { scroll-behavior:auto; } }
