/*
  SRW prose.sh terminal theme

  Upload this file to prose.sh as: _styles.css
  Example:
    scp _styles.css prose.sh:/

  No external image assets are required. The faint circuit/CRT texture below is an
  inline SVG data URI plus CSS gradients.
*/

:root {
  color-scheme: dark;

  --bg: #030604;
  --panel: rgba(5, 18, 10, 0.82);
  --panel-strong: rgba(4, 26, 12, 0.92);
  --text: #c8ffd8;
  --muted: #74b987;
  --dim: #4b815b;
  --green: #00ff66;
  --green-soft: #49ff91;
  --amber: #ffcc66;
  --danger: #ff5f7a;
  --line: rgba(0, 255, 102, 0.26);
  --glow: rgba(0, 255, 102, 0.34);
  --shadow: rgba(0, 0, 0, 0.72);

  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Liberation Mono",
          Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --terminal-glyphs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%2300ff66' stroke-opacity='.18' stroke-width='1'%3E%3Cpath d='M20 35h55v28h45v44h50'/%3E%3Cpath d='M35 170h45v-42h70v-65h35'/%3E%3Cpath d='M110 20v40m0 100v40M20 110h40m100 0h40'/%3E%3Ccircle cx='20' cy='35' r='3' fill='%2300ff66' fill-opacity='.2'/%3E%3Ccircle cx='170' cy='107' r='3' fill='%2300ff66' fill-opacity='.2'/%3E%3Ccircle cx='185' cy='63' r='3' fill='%2300ff66' fill-opacity='.2'/%3E%3Ccircle cx='35' cy='170' r='3' fill='%2300ff66' fill-opacity='.2'/%3E%3C/g%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
}

body {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;

  background-repeat: repeat, no-repeat, no-repeat, repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed, scroll;
  background-position: top left, 15% 0%, 85% 20%, top left, top left;

  margin: 0;
  padding: clamp(1rem, 3vw, 2.5rem);
  background:
    linear-gradient(rgba(0, 255, 102, 0.035) 50%, rgba(0, 0, 0, 0.05) 50%),
    radial-gradient(circle at 15% 0%, rgba(0, 255, 102, 0.13), transparent 30rem),
    radial-gradient(circle at 85% 20%, rgba(0, 180, 90, 0.10), transparent 26rem),
    var(--terminal-glyphs),
    var(--bg);
  background-size: 100% 4px, auto, auto, 220px 220px, auto;
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.68;
  text-shadow: 0 0 0.45rem rgba(150, 255, 180, 0.16);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background:
    linear-gradient(90deg, rgba(255, 0, 0, 0.025), rgba(0, 255, 102, 0.018), rgba(0, 80, 255, 0.025)),
    radial-gradient(circle at center, transparent 52%, rgba(0, 0, 0, 0.28) 100%);
  mix-blend-mode: screen;
}

body::after {
  content: "ONLINE";
  position: fixed;
  right: 1rem;
  bottom: 0.7rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: var(--green);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  opacity: 0.72;
  pointer-events: none;
}

body#post::after {
  content: "READ MODE";
}

a {
  color: var(--green-soft);
  text-decoration: none;
  border-bottom: 1px dotted rgba(73, 255, 145, 0.55);
}

a:hover,
a:focus-visible {
  color: #ffffff;
  background: rgba(0, 255, 102, 0.15);
  border-bottom-color: currentColor;
  outline: 1px solid rgba(0, 255, 102, 0.45);
  outline-offset: 0.18rem;
}

::selection {
  background: var(--green);
  color: #001805;
  text-shadow: none;
}

header,
main,
footer {
  width: min(100%, 78ch);
  margin-inline: auto;
}

header {
  position: relative;
  margin-block: clamp(0.5rem, 3vw, 2rem) 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: linear-gradient(180deg, var(--panel-strong), rgba(2, 9, 5, 0.78));
  box-shadow: 0 0 2.2rem rgba(0, 255, 102, 0.08), 0 1rem 3rem var(--shadow);
}

header::before {
  content: "ssh srw@prose -- tail -f /var/log/memes.log";
  display: block;
  margin: -0.25rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

main {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--panel);
  box-shadow: 0 1.1rem 3rem var(--shadow), inset 0 0 3rem rgba(0, 255, 102, 0.035);
}

footer {
  margin-block: 1.25rem 0;
  padding-block: 1rem;
  color: var(--dim);
  font-size: 0.86rem;
  text-align: center;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--green);
  line-height: 1.18;
  letter-spacing: -0.035em;
  text-shadow: 0 0 1rem var(--glow);
}

h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 8vw, 4.6rem);
}

h1::before {
  content: "> ";
  color: var(--muted);
}

h1::after {
  content: "_";
  display: inline-block;
  width: 0.7ch;
  color: var(--green-soft);
  animation: srw-cursor 1.12s steps(2, start) infinite;
}

h2 {
  margin-top: 2.2rem;
  padding-top: 0.8rem;
  border-top: 1px dashed rgba(0, 255, 102, 0.24);
  font-size: clamp(1.45rem, 4vw, 2.1rem);
}

h3 {
  color: var(--green-soft);
}

p {
  margin: 1rem 0;
}

hr {
  height: 1px;
  margin: 1.5rem 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

hr::after {
  content: "//";
  display: block;
  width: max-content;
  margin: -0.78rem auto 0;
  padding-inline: 0.55rem;
  background: #061009;
  color: var(--dim);
}

ul,
ol {
  padding-left: 1.4rem;
}

li::marker {
  color: var(--green);
}

/* prose.sh index: make the flat post list feel like terminal output. */
#blog main > ul,
#blog main > ol {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

#blog main > ul > li,
#blog main > ol > li,
#blog main > p {
  padding: 0.72rem 0;
  border-bottom: 1px dashed rgba(0, 255, 102, 0.16);
}

#blog main > ul > li::before,
#blog main > ol > li::before {
  content: "ls -l ";
  color: var(--dim);
}

#blog main a[href^="/"]::before {
  content: "./";
  color: var(--muted);
}

/* prose.sh post pages */
#post article,
#post main {
  max-width: 78ch;
}

#post main > p:first-of-type,
#post article > p:first-of-type {
  color: var(--muted);
}

#post time,
#blog time {
  color: var(--amber);
}

blockquote {
  margin: 1.4rem 0;
  padding: 0.75rem 1rem;
  border-left: 0.25rem solid var(--green);
  background: rgba(0, 255, 102, 0.07);
  color: #defee6;
}

blockquote::before {
  content: "/* ";
  color: var(--dim);
}

blockquote::after {
  content: " */";
  color: var(--dim);
}

code,
kbd,
samp {
  border: 1px solid rgba(0, 255, 102, 0.22);
  border-radius: 0.28rem;
  background: rgba(0, 0, 0, 0.48);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.94em;
}

code,
kbd {
  padding: 0.1rem 0.32rem;
}

pre {
  overflow-x: auto;
  margin: 1.35rem 0;
  padding: 1rem;
  border: 1px solid rgba(0, 255, 102, 0.28);
  border-radius: 0.65rem;
  background:
    linear-gradient(180deg, rgba(0, 255, 102, 0.06), transparent 1.8rem),
    rgba(0, 0, 0, 0.58);
  box-shadow: inset 0 0 2rem rgba(0, 255, 102, 0.04);
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(0, 255, 102, 0.18);
}

th {
  background: rgba(0, 255, 102, 0.12);
  color: var(--green);
  text-align: left;
}

img,
video {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(0, 255, 102, 0.28);
  border-radius: 0.65rem;
  filter: saturate(0.82) contrast(1.08);
  box-shadow: 0 0 1.6rem rgba(0, 255, 102, 0.10);
}

header img,
img[alt~="profile" i] {
  max-width: 7.5rem;
  border-radius: 50%;
  padding: 0.2rem;
  background: rgba(0, 255, 102, 0.08);
}

nav ul,
header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

nav li::marker,
header li::marker {
  content: "";
}

nav a,
header li a {
  display: inline-block;
  padding: 0.16rem 0.45rem;
  border: 1px solid rgba(0, 255, 102, 0.20);
  border-radius: 999px;
  background: rgba(0, 255, 102, 0.045);
}

/* Anchor links generated beside headings by prose/pico. */
h1 > a[href="#"],
h2 > a[href="#"],
h3 > a[href="#"],
h4 > a[href="#"],
h5 > a[href="#"],
h6 > a[href="#"] {
  margin-left: 0.25rem;
  color: var(--dim);
  border-bottom: 0;
  font-size: 0.55em;
  vertical-align: middle;
}

#post-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(0, 255, 102, 0.22);
  color: var(--muted);
}

@keyframes srw-cursor {
  0%, 42% { opacity: 1; }
  43%, 100% { opacity: 0; }
}

@media (max-width: 620px) {
  body {
    padding: 0.7rem;
    font-size: 15px;
  }

  header,
  main {
    border-radius: 0.5rem;
  }

  header::before {
    content: "ssh srw@prose";
  }

  body::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  h1::after {
    opacity: 1;
  }
}
