/* valk.nu — green-phosphor terminal homepage
   Design tokens recreated from handoff option 1c. Hard-edged, no radius. */

:root {
  --black: #020402;
  --green-bright: #33ff66;  /* primary text / accent */
  --green-dim: #1f8f3d;     /* secondary / inactive / borders */
  --green-light: #7dffab;   /* highlights / star */
}

* { box-sizing: border-box; }

/* Keep every link in the terminal palette in all states — never fall back to
   the browser's default blue/purple for :visited. Colors are refined per
   component below; these :visited rules just mirror each component's color. */
.breadcrumb a:visited,
.socials a:visited,
.project-name:visited,
.doc-link a:visited,
.ft-list a:visited,
.nav-item[data-current]:visited,
.tracker-tab[data-current]:visited { color: var(--green-bright); }

.nav-item:visited,
.tracker-tab:visited { color: var(--green-dim); }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--black);
  color: var(--green-bright);
  font-family: 'VT323', monospace;
  min-height: 100vh;
  padding: 32px 20px;
  -webkit-font-smoothing: none;
}

/* Centered content column shared by every page. */
.page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.cursor {
  animation: blink 1s steps(1) infinite;
}

/* Terminal card — scaled up to a real full-viewport column (max ~720px). */
.terminal {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--black);
  border: 2px solid var(--green-dim);
  box-shadow: 0 0 24px rgba(51, 255, 102, .2), 0 4px 18px rgba(0, 0, 0, .6);
  overflow: hidden;
}

/* CRT scanlines + vignette overlay */
.crt-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    repeating-linear-gradient(rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, .3) 2px),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .5) 100%);
}

.terminal-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 44px;
}

/* Header */
.header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.title {
  margin: 0;
  font-weight: 400;
  font-size: 36px;
  letter-spacing: 1px;
  line-height: 1;
}

.status {
  margin: 0;
  font-size: 26px;
  line-height: 1;
}

.divider {
  margin: 0;
  border: none;
  border-top: 1px dashed var(--green-dim);
}

/* Avatar + nav */
.profile {
  display: flex;
  gap: 26px;
  align-items: flex-start;
}

.avatar {
  flex: none;
  margin: 0;
}

.avatar-frame {
  position: relative;
  padding: 3px;
  border: 2px solid var(--green-dim);
  width: 120px;
  height: 120px;
}

.avatar-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: grayscale(1) contrast(1.3) brightness(0.95);
}

.avatar-tint {
  position: absolute;
  inset: 3px;
  background: var(--green-bright);
  mix-blend-mode: multiply;
}

.avatar-dodge {
  position: absolute;
  inset: 3px;
  background: var(--black);
  mix-blend-mode: color-dodge;
  opacity: .15;
}

.avatar-caption {
  text-align: center;
  font-size: 22px;
  margin-top: 6px;
}

.menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

.menu-label {
  margin: 0 0 4px;
  font-size: 22px;
  opacity: .8;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  display: inline-block;
  font-size: 26px;
  line-height: 1.15;
  color: var(--green-dim);
  text-decoration: none;
  white-space: pre;
}

.menu-item.is-active {
  color: var(--green-bright);
}

.menu-item:hover,
.menu-item:focus-visible {
  color: var(--green-bright);
  outline: none;
}

/* Socials */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.socials a {
  font-size: 22px;
  padding: 5px 10px;
  border: 1px solid var(--green-dim);
  color: var(--green-bright);
  text-decoration: none;
  line-height: 1;
}

.socials a:hover,
.socials a:focus-visible {
  border-color: var(--green-bright);
  outline: none;
}

/* Game panel */
.game-label {
  margin: 0 0 8px;
  font-size: 22px;
  text-align: center;
}

.game-screen {
  border: 2px solid var(--green-dim);
  background: #000;
  line-height: 0;
}

.game-screen:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
}

.game-screen canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  touch-action: none;
}

.game-caption {
  font-size: 18px;
  line-height: 1.6;
  opacity: .75;
  margin: 8px 0 0;
  text-align: center;
}

.game-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 12px;
}

.dpad {
  display: flex;
  gap: 8px;
}

.game-controls button {
  font-family: 'VT323', monospace;
  background: #000;
  color: var(--green-bright);
  border: 1px solid var(--green-dim);
  cursor: pointer;
}

.dpad button {
  width: 44px;
  height: 44px;
  font-size: 22px;
  padding: 0;
}

.reset-btn {
  font-size: 22px;
  padding: 9px 12px;
}

.game-controls button:hover,
.game-controls button:focus-visible {
  border-color: var(--green-bright);
  outline: none;
}

.game-controls button:active {
  background: var(--green-dim);
  color: var(--black);
}

/* ===================================================================
   Shared chrome: compact header + footer (used on every page)
   =================================================================== */

.site-header,
.site-footer {
  position: relative;
  background: var(--black);
  border: 2px solid var(--green-dim);
  box-shadow: 0 0 18px rgba(51, 255, 102, .12);
}

.site-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
}

.breadcrumb {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.breadcrumb a {
  color: var(--green-bright);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.breadcrumb-sep { color: var(--green-dim); }
.breadcrumb-current { color: var(--green-bright); }

.menu-toggle {
  font-family: 'VT323', monospace;
  font-size: 20px;
  line-height: 1;
  background: #000;
  color: var(--green-bright);
  border: 1px solid var(--green-dim);
  padding: 5px 10px;
  cursor: pointer;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  border-color: var(--green-bright);
  outline: none;
}

/* Dropdown styled like the homepage's "$ ls /menu" block. */
.menu-dropdown {
  border-top: 1px dashed var(--green-dim);
  padding: 14px 18px 16px;
}

.menu-dropdown[hidden] { display: none; }

.nav-item {
  display: inline-block;
  font-size: 22px;
  line-height: 1.35;
  color: var(--green-dim);
  text-decoration: none;
  white-space: pre;
}

.nav-item::before {
  content: "  ";
  white-space: pre;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--green-bright);
  outline: none;
}

/* Current page: build.js adds the data-current attribute. */
.nav-item[data-current] {
  color: var(--green-bright);
  text-decoration: underline;
}

.nav-item[data-current]::before { content: "> "; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 18px;
}

.footer-status {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

/* ===================================================================
   Home: intro block beside the avatar
   =================================================================== */

.whoami {
  flex: 1;
  padding-top: 2px;
}

.whoami p { margin: 0 0 6px; }

.whoami-cmd { font-size: 22px; opacity: .8; }
.whoami-name { font-size: 26px; color: var(--green-bright); }
.whoami-note { font-size: 20px; color: var(--green-dim); line-height: 1.4; }

/* ===================================================================
   Projects: terminal-log style list
   =================================================================== */

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project p { margin: 0; }

.project-cmd {
  font-size: 20px;
  color: var(--green-dim);
}

.project-name {
  display: inline-block;
  margin: 2px 0;
  font-size: 26px;
  color: var(--green-bright);
  text-decoration: none;
}

.project-name::before { content: "> "; }

.project-name:hover,
.project-name:focus-visible {
  text-decoration: underline;
  outline: none;
}

.project-desc {
  font-size: 20px;
  color: var(--green-bright);
  opacity: .75;
}

/* ===================================================================
   Data-driven documentation table (built from data/*.json)
   =================================================================== */

.doc-table-wrap {
  overflow-x: auto;
  margin-top: 6px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 19px;
}

.doc-table th,
.doc-table td {
  text-align: left;
  vertical-align: top;
  padding: 7px 16px 7px 0;
  border-bottom: 1px dashed rgba(31, 143, 61, .45);
}

.doc-table th {
  color: var(--green-light);
  font-weight: 400;
  letter-spacing: 1px;
  border-bottom: 1px dashed var(--green-dim);
}

.doc-link a {
  color: var(--green-bright);
  text-decoration: none;
}

.doc-link a::before {
  content: "> ";
  color: var(--green-dim);
}

.doc-link a:hover,
.doc-link a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.doc-desc {
  color: var(--green-bright);
  opacity: .78;
}

.doc-meta {
  color: var(--green-dim);
  white-space: nowrap;
}

.doc-count {
  margin: 14px 0 0;
  font-size: 18px;
  color: var(--green-dim);
}

/* ===================================================================
   Atlassian features tracker
   =================================================================== */

.tracker-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 2px 0 10px;
}

.tracker-tab {
  font-size: 19px;
  line-height: 1;
  padding: 5px 9px;
  border: 1px solid var(--green-dim);
  color: var(--green-dim);
  text-decoration: none;
  white-space: nowrap;
}

.tracker-tab:hover,
.tracker-tab:focus-visible {
  color: var(--green-bright);
  border-color: var(--green-bright);
  outline: none;
}

.tracker-tab[data-current] {
  color: var(--green-bright);
  border-color: var(--green-bright);
}

.tracker-tab[data-current]::before { content: "> "; }

.ft-meta {
  margin: 4px 0 12px;
  font-size: 19px;
  color: var(--green-dim);
}

.ft-summary {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 20px;
}

.ft-summary li { color: var(--green-bright); }

.ft-tag {
  display: inline-block;
  font-size: 15px;
  padding: 1px 6px;
  border: 1px solid var(--green-dim);
  color: var(--green-bright);
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Status accents stay monochrome — only brightness/weight varies. */
.ft-tag.ft-rolling_out_new { color: var(--green-light); border-color: var(--green-light); }
.ft-tag.ft-coming_soon { color: var(--green-bright); }
.ft-tag.ft-rolling_out { color: var(--green-dim); }
.ft-tag.ft-rollout_complete,
.ft-tag.ft-released { color: var(--green-dim); border-color: rgba(31, 143, 61, .5); }

.ft-prod {
  color: var(--green-dim);
  padding: 7px 16px 7px 0;
  border-bottom: 1px dashed rgba(31, 143, 61, .45);
  vertical-align: top;
}

.ft-product {
  font-size: 24px;
  font-weight: 400;
  color: var(--green-light);
  margin: 18px 0 6px;
}

.ft-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 19px;
}

.ft-list a {
  color: var(--green-bright);
  text-decoration: none;
}

.ft-list a::before { content: "> "; color: var(--green-dim); }

.ft-list a:hover,
.ft-list a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.ft-li-desc { color: var(--green-bright); opacity: .7; }

/* Product jump menu + back-to-top (new this week) */
.ft-jump {
  margin: 2px 0 16px;
  font-size: 19px;
  line-height: 1.7;
  color: var(--green-dim);
}

.ft-jump a { color: var(--green-bright); text-decoration: none; }
.ft-jump a:hover,
.ft-jump a:focus-visible { text-decoration: underline; outline: none; }
.ft-jump a:visited { color: var(--green-bright); }

.ft-product { scroll-margin-top: 16px; }
#ft-top { display: block; scroll-margin-top: 16px; }

.ft-backtop {
  display: inline-block;
  margin: 10px 0 2px;
  font-size: 18px;
  color: var(--green-dim);
  text-decoration: none;
}

.ft-backtop:hover,
.ft-backtop:focus-visible { color: var(--green-bright); text-decoration: underline; outline: none; }
.ft-backtop:visited { color: var(--green-dim); }

/* Table search box */
.tsearch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 10px 0;
  font-size: 19px;
  color: var(--green-dim);
}

.tsearch-prompt { color: var(--green-bright); white-space: nowrap; }

.tsearch-input {
  flex: 1;
  min-width: 180px;
  font-family: 'VT323', monospace;
  font-size: 19px;
  background: #000;
  color: var(--green-bright);
  border: 1px solid var(--green-dim);
  padding: 5px 9px;
}

.tsearch-input:focus { border-color: var(--green-bright); outline: none; }
.tsearch-input::placeholder { color: var(--green-dim); opacity: .7; }

.tsearch-count { color: var(--green-dim); white-space: nowrap; }

/* Table pagination controls */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 12px 0;
  font-size: 19px;
  color: var(--green-dim);
}

.pager button {
  font-family: 'VT323', monospace;
  font-size: 18px;
  background: #000;
  color: var(--green-bright);
  border: 1px solid var(--green-dim);
  padding: 3px 8px;
  cursor: pointer;
}

.pager button:hover:not(:disabled),
.pager button:focus-visible { border-color: var(--green-bright); outline: none; }
.pager button:disabled { color: var(--green-dim); opacity: .4; cursor: default; }

.pager-input {
  width: 3.2em;
  font-family: 'VT323', monospace;
  font-size: 18px;
  background: #000;
  color: var(--green-bright);
  border: 1px solid var(--green-dim);
  text-align: center;
  padding: 2px 4px;
}

.pager-status { color: var(--green-dim); }

/* How-this-works prose */
.ft-doc { font-size: 20px; line-height: 1.5; }
.ft-doc p { margin: 0 0 12px; }
.ft-doc h2 { font-size: 24px; font-weight: 400; color: var(--green-light); margin: 20px 0 8px; }
.ft-doc ul, .ft-doc ol { margin: 0 0 12px; padding-left: 22px; }
.ft-doc li { margin-bottom: 5px; }
.ft-doc a { color: var(--green-bright); }

/* ===================================================================
   About
   =================================================================== */

.about-text { margin: 10px 0 0; font-size: 20px; line-height: 1.55; }
.about-text p { margin: 0 0 14px; }
.about-prompt { margin: 8px 0 0; font-size: 20px; }

/* ===================================================================
   404 / not found (SEGFAULT.SYS)
   =================================================================== */

body.nf-page { padding: 0; }

.nf-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background:
    repeating-linear-gradient(rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, .25) 2px),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .55) 100%);
}

.notfound {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  animation: flicker 6s infinite;
}

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

@keyframes drift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(2px, -1px); }
  50%  { transform: translate(-2px, 1px); }
  75%  { transform: translate(1px, 1px); }
  100% { transform: translate(0, 0); }
}

.nf-error {
  border: 1px solid #e6483c;
  padding: 22px 24px;
  box-shadow: 0 0 18px rgba(230, 72, 60, .15);
}

.nf-trace { font-size: 19px; line-height: 1.6; color: #e6483c; }

.nf-glitch {
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.15;
  color: #e6483c;
  animation: drift .15s infinite steps(2);
}

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

.nf-flavor { font-size: 17px; opacity: .85; }

.nf-recover,
.nf-facts {
  border: 1px solid var(--green-dim);
  padding: 20px 24px;
  margin-top: 16px;
}

.nf-label { font-size: 17px; opacity: .75; margin-bottom: 10px; }

.nf-cmds { font-size: 19px; line-height: 1.7; overflow-x: auto; }

.nf-cmd {
  display: block;
  white-space: pre;
  text-decoration: none;
  color: var(--green-bright);
}

.nf-cmd:hover,
.nf-cmd:focus-visible { color: var(--green-light); outline: none; }
.nf-cmd:visited { color: var(--green-bright); }
.nf-cmt { color: var(--green-dim); }

.nf-facts { cursor: pointer; }
.nf-facts .nf-label { margin-bottom: 8px; }
.nf-facts:focus-visible { outline: 1px solid var(--green-bright); outline-offset: 2px; }
.nf-fact-wrap { font-size: 18px; opacity: .9; min-height: 27px; }

.nf-foot { text-align: center; margin-top: 22px; font-size: 15px; opacity: .55; }

/* ===================================================================
   Blog (placeholder)
   =================================================================== */

.blog-total { margin: 0 0 6px; font-size: 20px; color: var(--green-dim); }
.blog-empty { margin: 6px 0 0; font-size: 24px; color: var(--green-bright); }

/* ===================================================================
   Contact page (CONTACT.EXE)
   =================================================================== */

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: .82; }
  94% { opacity: 1; }
}

.crt-flicker { animation: flicker 6s infinite; }

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

.contact-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px dashed var(--green-dim);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.contact-title { font-size: 26px; }
.contact-ver { font-size: 16px; opacity: .7; }

.contact-term {
  border: 1px solid var(--green-dim);
  padding: 22px 24px;
  cursor: pointer;
}

.contact-term:focus-visible { outline: 1px solid var(--green-bright); outline-offset: 2px; }

.contact-line { font-size: 19px; line-height: 1.5; white-space: pre-wrap; }
.contact-prompt { font-size: 19px; }

/* Terminal line colours (boot sequence) */
.ct-bright { color: var(--green-bright); }
.ct-dim { color: var(--green-dim); }
.ct-light { color: var(--green-light); }
.ct-red { color: #e6483c; }

.contact-reveal {
  margin-top: 20px;
  border: 1px solid var(--green-bright);
  padding: 20px 24px;
  box-shadow: 0 0 18px rgba(51, 255, 102, .15);
}

.contact-decrypt { margin: 0 0 6px; font-size: 16px; opacity: .75; }
.contact-email { margin: 0 0 10px; font-size: 24px; }

.contact-send {
  display: inline-block;
  border: 1px solid var(--green-bright);
  padding: 8px 16px;
  text-decoration: none;
  font-size: 18px;
  color: var(--green-bright);
}

.contact-send:hover,
.contact-send:focus-visible { color: var(--green-light); border-color: var(--green-light); outline: none; }
.contact-send:visited { color: var(--green-bright); }

.contact-note { margin: 14px 0 0; font-size: 15px; opacity: .6; line-height: 1.6; }
.contact-foot { margin: 26px 0 0; text-align: center; font-size: 15px; opacity: .55; }

/* ===================================================================
   Responsive
   =================================================================== */

@media (max-width: 480px) {
  .terminal-inner { padding: 26px; gap: 18px; }
  .title { font-size: 28px; }
  .status { font-size: 20px; }
  .profile { gap: 18px; flex-direction: column; }
  .site-header-bar,
  .site-footer { padding: 10px 14px; }
}
