/* omtober — a tiling-window journal.
   Palette is a night-terminal scheme in the spirit of Omarchy's themes;
   type is whatever monospace you already have installed. */

:root {
  --bg: #16161e;
  --pane: #1a1b26;
  --pane-raised: #1f2335;
  --border: #2f334d;
  --border-active: #7aa2f7;
  --fg: #c0caf5;
  --muted: #7f87ac;
  --blue: #7aa2f7;
  --cyan: #7dcfff;
  --green: #9ece6a;
  --yellow: #e0af68;
  --orange: #ff9e64;
  --magenta: #bb9af7;
  --red: #f7768e;

  --mono: "CaskaydiaMono Nerd Font", "Cascadia Mono", "JetBrains Mono",
    ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gap: 0.75rem;
  --radius: 0;
  color-scheme: dark;
}

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

html {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--blue);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

::selection {
  background: var(--blue);
  color: var(--bg);
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.1rem;
  color: var(--blue);
}

h3 {
  font-size: 1rem;
  color: var(--magenta);
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

code,
kbd {
  font-family: inherit;
  font-size: 0.95em;
  background: var(--pane-raised);
  border: 1px solid var(--border);
  padding: 0 0.3em;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gap);
  top: var(--gap);
  background: var(--yellow);
  color: var(--bg);
  padding: 0.25rem 0.5rem;
  z-index: 10;
}

/* ── top bar (waybar-ish) ─────────────────────────────── */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem var(--gap);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.workspaces {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.workspaces a {
  display: block;
  padding: 0 0.6rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.workspaces a:hover {
  color: var(--fg);
}

.workspaces a[aria-current="page"] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.bar .brand {
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}

.bar .brand span {
  color: var(--blue);
}

.bar .status {
  color: var(--muted);
}

/* ── tiling layout ────────────────────────────────────── */

.tiles {
  flex: 1;
  display: grid;
  gap: var(--gap);
  padding: var(--gap);
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  align-content: start;
}

@media (min-width: 860px) {
  .tiles--split {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }

  .tiles--split > .pane--wide {
    grid-column: 1 / -1;
  }
}

.pane {
  position: relative;
  background: var(--pane);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem 1.25rem;
  min-width: 0;
}

.pane--active {
  border-color: var(--border-active);
}

.pane:focus-within {
  border-color: var(--border-active);
}

/* window title, sits on the top border */
.pane[data-title]::before {
  content: attr(data-title);
  position: absolute;
  top: -0.8em;
  left: 0.75rem;
  padding: 0 0.4rem;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.8rem;
}

.pane--active[data-title]::before {
  color: var(--blue);
}

/* ── prompt-style bits ────────────────────────────────── */

.prompt {
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.prompt::before {
  content: "❯ ";
  color: var(--green);
}

.cursor::after {
  content: "▋";
  color: var(--blue);
  margin-left: 0.1em;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

.lede {
  font-size: 1.05rem;
  max-width: 60ch;
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--blue);
}

/* key/value spec list, like a fetch readout */
.spec {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 1rem;
  margin: 0;
}

.spec dt {
  color: var(--magenta);
}

.spec dd {
  margin: 0;
}

/* ── log list ─────────────────────────────────────────── */

.log {
  list-style: none;
  margin: 0;
  padding: 0;
}

.log li {
  display: grid;
  grid-template-columns: 7ch 1fr auto;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
}

.log li:last-child {
  border-bottom: 0;
}

.log .day {
  color: var(--muted);
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0 0.4rem;
  border: 1px solid currentColor;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.tag--draft {
  color: var(--orange);
}

/* ── draft entry ──────────────────────────────────────── */

.draft-banner {
  background: repeating-linear-gradient(
    -45deg,
    var(--pane-raised) 0 12px,
    var(--pane) 12px 24px
  );
  border: 2px solid var(--orange);
  color: var(--orange);
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.fill-in {
  border-left: 3px solid var(--orange);
  background: var(--pane-raised);
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
}

.fill-in p:last-child {
  margin-bottom: 0;
}

.fill-in .todo {
  color: var(--orange);
}

.fill-in .todo::before {
  content: "TODO: ";
  font-weight: 700;
}

article h2 {
  margin-top: 1.5rem;
}

/* ── footer ───────────────────────────────────────────── */

.foot {
  padding: 0.75rem var(--gap);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.foot a {
  color: var(--muted);
}
