  :root {
    /* Phosphor palette: near-black screen, two green brightness levels
       plus a dim tone for secondary text. Not pure #00ff00 on purpose. */
    --bg:        #070a08;
    --bg-tint:   #0b110d;
    --green:     #2f9e5b;   /* bright  - headings, links, accent */
    --green-mid: #2a8250;   /* body text */
    --green-dim: #1e6340;   /* labels, meta, secondary */
    --glow:      rgba(47, 158, 91, 0.22);

    --measure: 46rem;       /* comfortable reading width */
  }

  * { box-sizing: border-box; }

  html { -webkit-text-size-adjust: 100%; }

  body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--green-mid);
    font-family: 'Iosevka', ui-monospace, 'JetBrains Mono',
                 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
    font-size: 1rem;
    line-height: 1.65;
    letter-spacing: 0.01em;
    text-shadow: 0 0 2px var(--glow);   /* soft phosphor bloom */
    padding: clamp(1.75rem, 5vw, 4rem) 1.25rem;
    display: flex;
    justify-content: center;
  }

  .screen {
    width: 100%;
    max-width: var(--measure);
  }

  /* ---- Header ---- */

  header { margin-bottom: 3rem; }

  h1 {
    font-size: clamp(2.4rem, 9vw, 3.75rem);
    font-weight: 600;
    line-height: 1;
    margin: 0;
    color: var(--green);
    text-shadow: 0 0 8px var(--glow);
  }

  /* blinking block cursor after the name */
  .cursor {
    display: inline-block;
    width: 0.55em;
    height: 0.95em;
    margin-left: 0.12em;
    background: var(--green);
    transform: translateY(0.08em);
    box-shadow: 0 0 8px var(--glow);
    animation: blink 1.1s steps(1) infinite;
  }
  @keyframes blink { 50% { opacity: 0; } }

  .tagline {
    margin: 0.9rem 0 0;
    color: var(--green-dim);
    font-size: 0.95rem;
  }

  /* ---- Sections ---- */

  section { margin-bottom: 2.75rem; }

  h2 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--green-dim);
    margin: 0 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(30, 99, 64, 0.45);
  }

  p { margin: 0 0 1rem; max-width: 42rem; }
  p:last-child { margin-bottom: 0; }

  /* the "what I'm into" entries */
  .entry { margin-bottom: 1.35rem; }
  .entry:last-child { margin-bottom: 0; }
  .entry .label { color: var(--green); }
  .entry p { margin: 0.15rem 0 0; }

  /* ---- Links ---- */

  a {
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px solid rgba(47, 158, 91, 0.4);
    transition: background 0.15s ease, color 0.15s ease;
  }
  a:hover {
    background: var(--green);
    color: var(--bg);
    text-shadow: none;
  }
  a:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
    border-radius: 1px;
  }

  .links { list-style: none; margin: 0; padding: 0; }
  .links li { margin-bottom: 0.55rem; }
  .links .k { color: var(--green-dim); display: inline-block; min-width: 6.5rem; }

  footer {
    margin-top: 3.5rem;
    color: var(--green-dim);
    font-size: 0.8rem;
    opacity: 0.75;
  }

  /* ---- Photo grid ---- */

  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  .gallery figure { margin: 0; }
  .gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(47, 158, 91, 0.35);
    /* photos sit under the phosphor theme; tweak or remove this
       filter line if you'd rather they show full, true colour */
    filter: grayscale(0.4) sepia(0.15) saturate(0.9);
    transition: filter 0.2s ease;
  }
  .gallery img:hover { filter: none; }
  .gallery img { cursor: zoom-in; }
  /* captions are hidden in the grid and only shown when expanded;
     they stay in the markup so the lightbox can read them */
  .gallery figcaption { display: none; }

  /* ---- Lightbox (click to expand) ---- */

  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(3, 6, 4, 0.93);
    backdrop-filter: blur(2px);
  }
  .lightbox[hidden] { display: none; }   /* reassert over display:flex */
  .lightbox-inner {
    margin: 0;
    max-width: min(100%, 1000px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    cursor: zoom-out;
    border: 1px solid rgba(47, 158, 91, 0.5);
    box-shadow: 0 0 24px rgba(47, 158, 91, 0.22);
  }
  .lightbox figcaption {
    color: var(--green-mid);
    font-size: 0.9rem;
    text-align: center;
  }
  .lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--green);
    font-family: inherit;
    font-size: 2rem;
    line-height: 1;
    padding: 0.15rem 0.5rem;
    text-shadow: 0 0 8px var(--glow);
  }
  .lightbox-close:hover { color: var(--bg); background: var(--green); }

  /* ---- Latest toot ---- */

  .toot-body { color: var(--green-mid); }
  .toot-body p { margin: 0 0 0.75rem; max-width: none; }
  .toot-body p:last-child { margin-bottom: 0; }
  .toot-body img.emojione,
  .toot-body img.custom-emoji {
    height: 1.1em; width: auto; vertical-align: -0.2em;
  }
  .toot-meta {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
    color: var(--green-dim);
  }
  .toot-meta a {
    color: var(--green-dim);
    border-bottom-color: rgba(30, 99, 64, 0.4);
  }
  .toot-loading { color: var(--green-dim); }

  /* ---- CRT screen effects (scanlines + vignette + flicker) ---- */

  .crt::before,
  .crt::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
  }
  /* fine scanlines */
  .crt::before {
    background: repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.28) 3px,
      rgba(0, 0, 0, 0.28) 3px
    );
    opacity: 0.5;
  }
  /* vignette + faint green wash from the centre */
  .crt::after {
    background:
      radial-gradient(120% 120% at 50% 40%,
        rgba(47, 158, 91, 0.04) 0%,
        rgba(0, 0, 0, 0) 45%),
      radial-gradient(130% 130% at 50% 50%,
        rgba(0, 0, 0, 0) 55%,
        rgba(0, 0, 0, 0.55) 100%);
  }

  /* very subtle whole-screen flicker */
  @keyframes flicker {
    0%, 100% { opacity: 1; }
    97%      { opacity: 1; }
    97.5%    { opacity: 0.94; }
    98%      { opacity: 1; }
  }
  .screen { animation: flicker 6s infinite; }

  /* Respect reduced-motion: no flicker, no blink */
  @media (prefers-reduced-motion: reduce) {
    .screen { animation: none; }
    .cursor { animation: none; }
  }

  /* ---- Posts feed ---- */

  .post { margin-bottom: 2rem; }
  .post:last-child { margin-bottom: 0; }
  .post-meta {
    margin: 0 0 0.3rem;
    font-size: 0.8rem;
    color: var(--green-dim);
  }
  .post-meta a { color: var(--green-dim); border-bottom-color: rgba(30, 99, 64, 0.4); }
  .post-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--green);
  }
  .post-title a { color: inherit; border: none; }
  .post-title a:hover { background: none; color: var(--green); text-shadow: 0 0 8px var(--glow); }
  .post-body p { margin: 0 0 0.75rem; }
  .post-body p:last-child { margin-bottom: 0; }
  .post-body img { max-width: 100%; height: auto; border: 1px solid rgba(47, 158, 91, 0.35); }
  .back { margin-top: 2.5rem; font-size: 0.85rem; }
