/* Workshop — gierz.xyz "Tor" (gate).
 *
 * Visually identical to the unified portal at findorff.gierz.eu/ —
 * same `.gh-*` chrome, same 1rem flat font size, same color tokens.
 * The workshop is its own service though, so it ships its own copy
 * of the stylesheet (no cross-service @import). When you tweak the
 * portal's styles, mirror the change here.
 */

:root {
  --base:     #1e1e2e;
  --mantle:   #181825;
  --crust:    #11111b;
  --surface0: #313244;
  --surface1: #45475a;
  --overlay0: #6c7086;
  --overlay1: #7f849c;
  --text:     #cdd6f4;
  --subtext:  #a6adc8;
  --blue:     #89b4fa;
  --lavender: #b4befe;
  --sapphire: #74c7ec;
  --mauve:    #cba6f7;
  --green:    #a6e3a1;
  --peach:    #fab387;
  --red:      #f38ba8;
}

/* Self-hosted JetBrains Mono — same set the portal + Forgejo theme ship. */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/assets/fonts/JetBrainsMono-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/assets/fonts/JetBrainsMono-Bold.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  padding: 3rem 1rem;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  color: var(--text);
  font-family: "Maple Mono NF", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  line-height: 1.6;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(137,180,250,0.08), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(203,166,247,0.07), transparent 60%),
    var(--base);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(205,214,244,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205,214,244,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
}

.gh-page { width: 100%; max-width: 820px; position: relative; z-index: 1; }
.gh-card {
  background: rgba(24, 24, 37, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--surface1);
  border-radius: 14px;
  padding: 2.5rem 2.25rem 2rem;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 60px -20px rgba(0,0,0,0.6);
  animation: card-rise 0.5s ease both;
}

.gh-dir { color: var(--sapphire); font-weight: 700; }
.gh-cmd-line { margin-top: 0.1rem; }
.gh-prompt { color: var(--green); font-weight: 700; margin-right: 0.6ch; }
.gh-cmd { color: var(--text); }

.gh-cmd-wrap {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  width: 0;
  max-width: 100%;
  animation: type-cmd calc(0.35s + var(--cmd-chars, 10) * 0.025s)
             steps(40, end) 0.1s forwards;
}
@keyframes type-cmd {
  from { width: 0; }
  to   { width: calc(var(--cmd-chars, 10) * 1ch); }
}

.gh-reveal { opacity: 0; animation: reveal 0.2s ease-out forwards; }
@keyframes reveal { to { opacity: 1; } }

.gh-help { margin-top: 1.4rem; }
.gh-help-tagline { margin: 0 0 1.3rem; color: var(--text); }
.gh-help-host { color: var(--sapphire); font-weight: 700; }

/* The project table — name column, description column. Mirrors the
 * portal's .units grid but two-column (no green dot prefix since
 * projects aren't running services with a status indicator). */
.projects {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.5rem;
  row-gap: 0.35rem;
  margin: 0.6rem 0 0;
  align-items: baseline;
}
.projects .head {
  color: var(--overlay1);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.projects a.name {
  color: var(--sapphire);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.projects a.name:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.projects .desc { color: var(--subtext); }

/* Dimmed for non-active states (archived, planned). Same hue, lower
 * opacity — reads as "exists but isn't live." */
.projects .name.dim {
  color: var(--overlay1);
}
.projects .name.dim:hover {
  color: var(--lavender);
  border-bottom-color: var(--lavender);
}
.projects .desc.dim {
  color: var(--overlay0);
}
/* `planned` items get a peach-ish "wip" hint so they're distinguishable
 * from archived (just dimmed). */
.projects .name.dim.wip {
  color: var(--peach);
}

.summary {
  margin-top: 1.1rem;
  color: var(--subtext);
}
.summary .gh-prompt {
  /* Inline ❯ before each toggle word */
  margin-right: 0.2ch;
}
.summary a.toggle {
  color: var(--text);
  text-decoration: none;
  margin-right: 0.4ch;
  border-bottom: 1px dashed transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.summary a.toggle:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.gh-bottom {
  margin-top: 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--surface1);
}
.gh-bottom a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.gh-bottom a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .gh-cmd-wrap { animation: none; width: auto; }
  .gh-reveal   { animation: none; opacity: 1; }
  .gh-card     { animation: none; }
}
