/*
 * HACKER
 * Golden reference: ../reference/hacker.png
 *
 * Calm operations console rather than CRT cosplay.
 * Petroleum panels, cyan structure and amber navigation.
 */

:root[data-theme="hacker"],
[data-theme="hacker"] {
  color-scheme: dark;

  --font-ui: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-copy: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --font-terminal: "Terminus TTF", "Terminus", var(--font-mono);
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-strong: 600;

  --text-xxs: 10px;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 19px;
  --text-xl: 23px;

  --line-tight: 1.06;
  --line-ui: 1.20;
  --line-copy: 1.40;

  --tracking-ui: .01em;
  --tracking-label: .09em;
  --tracking-display: .025em;

  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-7: 16px;
  --space-8: 20px;

  --radius-window: 4px;
  --radius-control: 2px;
  --border-width: 1px;

  --titlebar-height: 31px;
  --titlebar-button-size: 15px;
  --menubar-height: 39px;
  --front-panel-height: 68px;
  --statusbar-height: 23px;
  --dockapp-size: 110px;
  --window-gap: 11px;
  --dockapp-gap: var(--window-gap);
  --scrollbar-size: 13px;
  --meter-height: 4px;

  --hk-black: #061018;
  --hk-blueblack-1: #0b1a24;
  --hk-blueblack-2: #0e2230;
  --hk-blueblack-3: #12303f;
  --hk-blueblack-4: #173b4a;

  --hk-paper: #d6e1e5;
  --hk-muted: #93a8b0;
  --hk-dim: #627982;

  --hk-green: #79c995;
  --hk-green-hi: #a1e0b4;
  --hk-cyan: #69c9df;
  --hk-cyan-hi: #a1e1ed;
  --hk-magenta: #c58ab8;
  --hk-blue: #6695ca;
  --hk-amber: #e1ab5a;
  --hk-red: #dc7777;

  --desktop-bg: #07141c;
  --desktop-bg-alt: #0a1b25;

  --surface-window: var(--hk-blueblack-1);
  --surface-window-alt: var(--hk-blueblack-2);
  --surface-raised: #17313e;
  --surface-sunken: #07141c;
  --surface-input: #091821;
  --surface-menubar: #0c2632;
  --surface-titlebar: #133542;
  --surface-titlebar-inactive: #102a35;
  --surface-statusbar: #0a202b;
  --surface-dockapp: #0d2430;
  --surface-terminal: #06131a;
  --surface-selection: #245063;

  --text-primary: #d6e1e5;
  --text-secondary: #afc0c6;
  --text-muted: #758d96;
  --text-disabled: #52666e;

  --text-titlebar: #dff8fc;
  --text-titlebar-inactive: #81969d;
  --text-menubar: #d8e9ed;
  --text-statusbar: #a9bbc1;

  --text-terminal: #c8d7d7;
  --text-terminal-dim: #748c8e;

  --accent-primary: var(--hk-green);
  --accent-secondary: var(--hk-cyan);
  --accent-tertiary: var(--hk-amber);
  --accent-warning: var(--hk-amber);
  --accent-danger: var(--hk-red);
  --accent-ok: var(--hk-green-hi);

  --link: var(--hk-amber);
  --link-hover: #ffd18a;

  --selection-bg: #27576a;
  --selection-fg: #effcff;
  --focus-color: var(--hk-cyan);

  --border-outer: #496977;
  --border-inner: #17313e;
  --border-muted: #294956;

  --bevel-highlight: #315563;
  --bevel-light: #213f4b;
  --bevel-dark: #07151d;
  --bevel-shadow: #041017;

  --separator: #2b4b58;
  --window-outline: #315a69;
  --titlebar-rule: 1px solid #5ab7cc;

  --shadow-window: 0 8px 24px rgb(0 5 9 / 42%);

  --shadow-raised: inset 0 1px 0 rgb(161 225 237 / 10%);

  --shadow-sunken: inset 0 1px 3px rgb(0 3 6 / 58%);

  --shadow-focus:
    0 0 0 1px var(--focus-color),
    0 0 0 3px rgb(105 201 223 / 13%);

  --glow-text: none;
  --glow-accent: none;
  --glow-terminal: none;

  --meter-track: #0d171b;
  --meter-fill: var(--hk-green);
  --meter-fill-alt: var(--hk-cyan);
  --meter-fill-warn: var(--hk-amber);

  --graph-grid: #1b3035;
  --graph-line: var(--hk-green-hi);
  --graph-line-alt: var(--hk-blue);
  --graph-baseline: #314048;

  --led-off: #153022;
  --led-on: var(--hk-green-hi);
  --led-warn: var(--hk-amber);

  --dock-label: var(--hk-cyan-hi);
  --dock-value: #c6c4bd;

  --terminal-prompt: var(--hk-green);
  --terminal-user: var(--hk-green-hi);
  --terminal-path: var(--hk-cyan);
  --terminal-command: var(--hk-green-hi);
  --terminal-cursor: #d5d2ca;
  --terminal-error: #ed7979;
  --terminal-warning: #e2ad52;

  --workspace-active-bg: #235164;
  --workspace-active-fg: #f1fbfd;
  --workspace-inactive-bg: #0b1b25;
  --workspace-inactive-fg: #a9bdc4;
  --workspace-border: #315462;

  --scanline-color: #62d9d2;
  --scanline-opacity: 0;
  --scanline-size: 3px;
  --noise-opacity: .006;
  --vignette-opacity: .035;
  --phosphor-blur: 0;
  --image-filter: contrast(1.04) brightness(.84) saturate(.88) hue-rotate(7deg);
  --icon-opacity: .94;
  --avatar-bg: #a8c7ce;
  --avatar-filter: grayscale(1) contrast(1.48) brightness(.68);
  --avatar-opacity: 1;
}

/* Hacker is a flat operations surface: gridded, quiet, and compact. */
[data-theme="hacker"] body {
  background:
    linear-gradient(rgb(105 201 223 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(105 201 223 / 3%) 1px, transparent 1px),
    linear-gradient(145deg, var(--desktop-bg), var(--desktop-bg-alt));
  background-size: 32px 32px, 32px 32px, auto;
}

[data-theme="hacker"] .menubar {
  border-top: 3px solid var(--accent-secondary);
  background: linear-gradient(90deg, #0b2b38, var(--surface-menubar));
  box-shadow: 0 3px 12px rgb(0 4 7 / 28%);
}

[data-theme="hacker"] .menubar__avatar { transform: none; }

[data-theme="hacker"] .menubar__theme select,
[data-theme="hacker"] .menubar__language button,
[data-theme="hacker"] .front-panel__restore {
  border-color: var(--separator);
  background: var(--surface-sunken);
  box-shadow: none;
}

[data-theme="hacker"] .menubar__language button[aria-pressed="true"] {
  border-color: var(--accent-secondary);
}

[data-theme="hacker"] .window {
  border-color: var(--window-outline);
  box-shadow: var(--shadow-window);
}

[data-theme="hacker"] .window__titlebar {
  background: linear-gradient(90deg, #163e4d, var(--surface-titlebar) 72%);
  text-transform: uppercase;
}

[data-theme="hacker"] .window__titlebar::before {
  content: "◆";
  color: var(--accent-warning);
  font-size: 7px;
}

[data-theme="hacker"] .window__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-label);
}

[data-theme="hacker"] .window__controls i,
[data-theme="hacker"] .window__hide {
  border-color: #527888;
  border-radius: var(--radius-control);
  background: transparent;
  box-shadow: none;
}

[data-theme="hacker"] .dockapp {
  border-left: 3px solid var(--accent-secondary);
  box-shadow: 0 5px 14px rgb(0 4 7 / 26%);
}

[data-theme="hacker"] .front-panel {
  border-top: 2px solid var(--accent-secondary);
  box-shadow: 0 -4px 14px rgb(0 4 7 / 24%);
}

[data-theme="hacker"] .ws {
  min-width: 64px;
  flex-direction: row;
  box-shadow: none;
}

[data-theme="hacker"] .ws__num { font-size: var(--text-md); }

[data-theme="hacker"] .front-panel__launchers a {
  min-width: 70px;
  flex-direction: row;
}

[data-theme="hacker"] .front-panel__launchers span { font-size: var(--text-md); }

/* Hacker-only: audio.device is an xterm running mpg321. */
[data-theme="hacker"] .audio-device__panel {
  display: none;
}
[data-theme="hacker"] .audio-device__xterm {
  display: block;
}
[data-theme="hacker"] .w-audio .window__title {
  font-size: 0;
}
[data-theme="hacker"] .w-audio .window__title::before {
  content: "xterm";
  font-size: var(--text-xs);
  text-transform: none;
}
