/* j-dog.net: dark terminal theme */
:root {
  --bg: #0b0d10;
  --panel: #12151a;
  --line: #232830;
  --fg: #d6dae0;
  --muted: #8b949e;
  --accent: #b07cc6;      /* heritage purple, lifted for contrast */
  --accent-dim: #9a58af;  /* the 2007 site's exact purple */
  --green: #33ff33;      /* phosphor terminal green */
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding-block: 24px 48px;
  padding-inline: 16px;
}

/* header */
.top { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 28px; }
.prompt { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.prompt b { color: var(--green); font-weight: 600; }
.site { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: 0.02em; }
.site a { color: var(--fg); }
.site a:hover { color: var(--accent); text-decoration: none; }
nav.ls { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav.ls a { color: var(--accent); }
nav.ls a::after { content: "/"; color: var(--muted); }
nav.ls a[aria-current="page"] { color: var(--fg); font-weight: 600; }
nav.ls a[aria-current="page"]::after { color: var(--green); }

/* headings as shell commands */
h1 { font-size: 20px; margin: 0 0 16px; font-weight: 600; }
h2 { font-size: 16px; margin: 36px 0 12px; font-weight: 600; color: var(--fg); }
h2::before { content: "$ "; color: var(--green); }
h3 { font-size: 15px; margin: 24px 0 8px; color: var(--accent); font-weight: 600; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
small, .small { font-size: 13px; }

/* home page: profile column on the left, text on the right */
.cols { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.cols main h2:first-child { margin-top: 0; }
.profile img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
}
.profile .name { font-size: 26px; font-weight: 700; margin: 14px 0 2px; }
.profile .roles { color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.profile .roles a { color: var(--muted); border-bottom: 1px dotted var(--line); }
.profile .roles a:hover { color: var(--accent); text-decoration: none; }
.profile .email { margin: 0 0 10px; }
.profile .email a { color: var(--green); }
.profile ul.social { list-style: none; padding: 0; margin: 0 0 14px; font-size: 14px; }
.profile ul.social li { padding: 3px 0; }
.profile ul.social a { display: inline-flex; align-items: center; gap: 9px; }
.profile ul.social svg { width: 16px; height: 16px; fill: var(--muted); flex: none; }
.profile ul.social img { width: 16px; height: 16px; border-radius: 3px; flex: none; }
.profile ul.social a:hover svg { fill: var(--accent); }
@media (max-width: 640px) {
  .cols { grid-template-columns: 1fr; gap: 8px; }
  .profile img { max-width: 160px; }
}

/* hero (used by inner pages that keep the old one-line intro) */
.hero .name { font-size: 28px; font-weight: 700; margin: 0 0 4px; }
.hero .roles { color: var(--muted); margin: 0 0 20px; }
.hero .roles a { color: var(--muted); border-bottom: 1px dotted var(--line); }
.hero .roles a:hover { color: var(--accent); text-decoration: none; }
.cursor::after {
  content: "_";
  color: var(--green);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* lists */
ul.plain { list-style: none; padding: 0; margin: 0 0 16px; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
/* dated entries: hanging indent so wrapped lines line up under the title, not the year */
ul.plain li:has(> .when) { padding-left: 7ch; text-indent: -7ch; }
ul.plain .when { color: var(--muted); display: inline-block; width: 6ch; text-indent: 0; }
ul.plain.dir li { display: grid; grid-template-columns: 11ch minmax(0, 1fr); gap: 0 12px; }
@media (max-width: 480px) {
  ul.plain.dir li { grid-template-columns: 1fr; }
}
ul.plain .tag { color: var(--green); font-size: 12px; margin-left: 6px; }
ul.dash { list-style: none; padding: 0; margin: 0 0 16px; }
ul.dash li { padding-left: 2ch; text-indent: -2ch; margin: 4px 0; }
ul.dash li::before { content: "- "; color: var(--muted); }

/* project list: square icon, then name and description */
ul.projects { list-style: none; padding: 0; margin: 0 0 16px; }
ul.projects li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
ul.projects li:last-child { border-bottom: 0; }
ul.projects img { width: 64px; height: 64px; border-radius: 8px; background: #fff; display: block; }
ul.projects a.icon { display: block; line-height: 0; }
ul.projects a.icon:hover img { outline: 2px solid var(--accent); }
ul.projects li > div > a:first-child { font-weight: 600; }
ul.projects p { margin: 2px 0 0; color: var(--muted); }

/* tables */
.tablewrap { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td.when { white-space: nowrap; color: var(--muted); }
table.timeline td.when { font-weight: 600; color: var(--green); width: 6ch; }
table.timeline ul.dash { margin: 0; }
table.timeline ul.dash li { margin: 2px 0; }

/* token index: square thumbnails, each tile links to the token's page */
h2 .muted { font-weight: 400; font-size: 13px; }
h2 .muted::before { content: "# "; }
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--fg);
}
.tile:hover, .tile:focus { text-decoration: none; border-color: var(--accent); }
.tile:hover b { color: var(--accent); }
.tile .img {
  aspect-ratio: 1 / 1;
  max-width: 100%;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.tile .img img { width: 100%; height: 100%; object-fit: contain; display: block; }
img.pixel { image-rendering: pixelated; }
.tile .img .none { color: var(--muted); font-size: 12px; }
.tile .body { padding: 8px 10px; font-size: 13px; line-height: 1.45; }
.tile .body b, .tile .body .by, .tile .body .chain { display: block; }
.tile .body b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .body .chain { color: var(--green); font-size: 11px; margin-top: 2px; }

/* token page: image on the left, facts on the right, story and market below */
article.token { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 32px; align-items: start; margin-bottom: 8px; }
article.token .art img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #000; }
article.token .art .none { aspect-ratio: 1 / 1; border: 1px dashed var(--line); border-radius: 4px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
article.token .art audio { display: block; width: 100%; margin-top: 10px; }
article.token h1 { font-size: 24px; margin: 0 0 2px; }
article.token .asset { color: var(--green); font-size: 13px; margin: 0 0 12px; word-break: break-all; }
article.token .summary { margin: 0 0 16px; }
table.facts { font-size: 13px; }
table.facts th { width: 11ch; padding-left: 0; }
table.facts td { word-break: break-all; }
table.market { font-size: 13px; margin: 0 0 12px; }
table.market td:first-child { color: var(--muted); white-space: nowrap; }
table.market td:last-child { white-space: nowrap; text-align: right; }
@media (max-width: 640px) {
  article.token { grid-template-columns: 1fr; gap: 16px; }
  article.token .art { max-width: 440px; }
}

/* contact icons row */
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 20px; }
.links a { white-space: nowrap; }

/* status / notes */
.status { color: var(--muted); font-size: 13px; margin: 8px 0; }
mark.todo {
  background: transparent;
  color: var(--green);
  border: 1px dashed var(--green);
  border-radius: 3px;
  padding: 0 5px;
  font-size: 12px;
}
pre, code { font-family: var(--mono); }
pre {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px;
  overflow-x: auto;
  font-size: 13px;
}
details summary { cursor: pointer; color: var(--accent); }

/* footer */
footer { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 14px; color: var(--muted); font-size: 13px; }
footer a { color: var(--muted); text-decoration: underline dotted; }
footer a:hover { color: var(--accent); }

@media (max-width: 480px) {
  body { font-size: 14px; }
  .hero .name { font-size: 24px; }
}
