/* neocity.andrewlengly.com
   A hand-built page in the old personal-web style. Plain HTML and one stylesheet, no build step.
   Emerald #0F2C24 is the house color, same as andrewlengly.com. Departure Mono is for accents only:
   title bars, buttons, labels. Anything people read sits in Verdana. */

@font-face {
  font-family: "Departure Mono";
  src: url("DepartureMono-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --emerald: #0f2c24;
  --mint: #3a987d;
  --mint-soft: #c9f2e3;
  --paper: #f4efe4;
  --paper-2: #e8e1d0;
  --ink: #1b1b18;
  --muted: #5c5a52;
  --deep: #06140f;
  --gold: #ffd23f;
  --pixel: "Departure Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { background: var(--emerald); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 13px/1.6 Verdana, Geneva, Tahoma, sans-serif;
  /* A tiled checker, the kind every 2003 homepage had behind it. */
  background-color: var(--emerald);
  background-image:
    linear-gradient(45deg, #133a2f 25%, transparent 25%, transparent 75%, #133a2f 75%),
    linear-gradient(45deg, #133a2f 25%, transparent 25%, transparent 75%, #133a2f 75%);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  image-rendering: pixelated;
}

a { color: #0b5a43; }
a:visited { color: #6a3d8f; }
a:hover { background: var(--gold); color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px dashed var(--gold); outline-offset: 2px; }

img { max-width: 100%; }
.px { image-rendering: pixelated; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--gold); color: var(--ink); padding: 4px 8px; font-family: var(--pixel);
}
.skip:focus { left: 8px; z-index: 10; }

/* ---------- Page frame ---------- */

.page {
  width: min(960px, 100% - 24px);
  margin: 18px auto 40px;
  background: var(--paper);
  border: 3px solid var(--deep);
  box-shadow: 8px 8px 0 var(--deep);
}

.banner {
  position: relative;
  padding: 22px 20px 16px;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.14) 1px, transparent 1.5px) 0 0 / 6px 6px,
    var(--emerald);
  color: var(--paper);
  border-bottom: 3px solid var(--deep);
  overflow: hidden;
}
.banner h1, .banner p { position: relative; z-index: 1; }
.banner h1 {
  margin: 0;
  font: 400 clamp(30px, 6vw, 56px)/1 var(--pixel);
  letter-spacing: .02em;
  color: var(--paper);
  text-shadow: 3px 3px 0 var(--deep);
}
.banner h1 .tld { color: var(--mint); }
.banner p { margin: 8px 0 0; color: var(--mint-soft); max-width: 46ch; }
.banner .walker {
  position: absolute; right: 22px; bottom: 10px;
  width: 48px; height: 80px;
  animation: bob 1.2s steps(2) infinite;
}
/* Stars stay in the open sky on the right, clear of the title. */
.banner .stars {
  position: absolute; top: 0; bottom: 0; left: 62%; right: 70px; pointer-events: none;
}
.banner .stars i {
  position: absolute; width: 4px; height: 4px; background: var(--gold);
  box-shadow: 0 -4px 0 var(--gold), 0 4px 0 var(--gold), -4px 0 0 var(--gold), 4px 0 0 var(--gold);
  animation: twinkle 2.4s steps(3) infinite;
}

/* The ticker under the banner. */
.ticker {
  overflow: hidden;
  white-space: nowrap;
  background: var(--deep);
  color: var(--gold);
  font: 13px/26px var(--pixel);
  border-bottom: 3px solid var(--deep);
}
.ticker span { display: inline-block; padding-left: 100%; animation: scroll 32s linear infinite; }

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 16px;
}

/* ---------- Sidebar ---------- */

.side { display: flex; flex-direction: column; gap: 14px; }

.nav { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block;
  padding: 6px 10px;
  font: 14px/1.2 var(--pixel);
  color: var(--paper);
  text-decoration: none;
  background: var(--emerald);
  border: 2px solid;
  border-color: var(--mint) var(--deep) var(--deep) var(--mint);
}
.nav a::before { content: "> "; color: var(--mint); }
.nav a:hover { background: var(--mint); color: var(--deep); }
.nav a:hover::before { color: var(--deep); }
.nav a[aria-current="page"] { background: var(--gold); color: var(--ink); border-color: var(--deep) var(--paper) var(--paper) var(--deep); }
.nav a[aria-current="page"]::before { content: "* "; color: var(--ink); }

/* ---------- Windows ---------- */

.win {
  background: #fffdf7;
  border: 2px solid var(--deep);
  box-shadow: 4px 4px 0 rgba(6,20,15,.35);
}
.win > h2, .win > h3, .win > .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0;
  padding: 3px 6px 3px 8px;
  font: 400 13px/1.4 var(--pixel);
  color: var(--paper);
  background: linear-gradient(90deg, var(--emerald), #1d5a48);
  border-bottom: 2px solid var(--deep);
}
.win > h2::after, .win > h3::after, .win > .bar::after {
  content: "_ \25A1 x";
  font-size: 11px; letter-spacing: 3px; color: var(--mint-soft);
}
.win .body { padding: 10px 12px; }
.win .body > :first-child { margin-top: 0; }
.win .body > :last-child { margin-bottom: 0; }

.main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Bits ---------- */

.label { font-family: var(--pixel); color: var(--emerald); }
.muted { color: var(--muted); }
.small { font-size: 11px; }

.status dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; }
.status dt { font-family: var(--pixel); color: var(--emerald); }
.status dd { margin: 0; }

.portrait {
  float: right;
  width: 112px; height: 112px;
  margin: 0 0 8px 12px;
  border: 2px solid var(--deep);
  background: var(--mint-soft);
}

.log { margin: 0; padding: 0; list-style: none; }
.log li { padding: 6px 0; border-bottom: 1px dashed #c6bda8; }
.log li:last-child { border-bottom: 0; }
.log time { font-family: var(--pixel); color: var(--emerald); margin-right: 6px; }

.new {
  font: 11px var(--pixel);
  color: var(--ink); background: var(--gold);
  padding: 0 4px; margin-left: 4px;
  animation: blink 1s steps(1) infinite;
}

/* Blinkies, made in CSS. */
.blinkies { display: flex; flex-wrap: wrap; gap: 6px; }
.blinkie {
  display: inline-flex; align-items: center; justify-content: center;
  width: 150px; height: 20px;
  font: 11px/1 var(--pixel);
  border: 1px solid var(--deep);
  color: var(--paper);
  background: repeating-linear-gradient(90deg, var(--emerald) 0 6px, #164034 6px 12px);
}
.blinkie.flash { animation: flash 1.4s steps(1) infinite; }
.blinkie.gold { background: repeating-linear-gradient(90deg, #ffe48a 0 6px, var(--gold) 6px 12px); color: var(--ink); }
.blinkie.paper { background: var(--paper-2); color: var(--emerald); }

.buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.buttons a, .buttons img { display: block; width: 88px; height: 31px; }
.buttons a:hover { background: none; outline: 2px solid var(--gold); }

.stamps { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.stamps img { width: 64px; height: 80px; filter: drop-shadow(2px 2px 0 rgba(6,20,15,.4)); transition: transform .15s steps(2); }
.stamps img:nth-child(odd) { transform: rotate(-4deg); }
.stamps img:nth-child(even) { transform: rotate(3deg); }
.stamps img:hover { transform: rotate(0) scale(1.08); }

/* Project shelf */
.shelf { margin: 0; padding: 0; list-style: none; }
.shelf li {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px dotted #c6bda8;
}
.shelf li:last-child { border-bottom: 0; }
.shelf li::before { content: "\25C6"; color: var(--mint); font-size: 10px; }
.shelf .name { font-weight: bold; }
.shelf .note { display: block; color: var(--muted); font-size: 12px; }
.tag {
  font: 11px var(--pixel); white-space: nowrap;
  padding: 1px 5px; border: 1px solid var(--deep);
}
.tag.live { background: var(--mint-soft); }
.tag.wip { background: #ffe48a; }
.tag.later { background: var(--paper-2); }

/* Polaroids */
.polaroids { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.polaroids figure {
  margin: 0; padding: 8px 8px 6px; background: #fff;
  border: 1px solid #cfc6b2; box-shadow: 3px 3px 0 rgba(6,20,15,.25);
}
.polaroids figure:nth-child(3n+1) { transform: rotate(-2deg); }
.polaroids figure:nth-child(3n+2) { transform: rotate(1.5deg); }
.polaroids img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.polaroids figcaption { margin-top: 6px; font-size: 11px; text-align: center; color: var(--muted); }

/* Q and A */
.qa dt { margin-top: 10px; font-family: var(--pixel); color: var(--emerald); }
.qa dt::before { content: "Q: "; color: var(--mint); }
.qa dd { margin: 2px 0 0; }

.code {
  display: block; width: 100%; min-height: 64px; resize: vertical;
  font: 11px/1.4 ui-monospace, Menlo, Consolas, monospace;
  background: var(--deep); color: var(--mint-soft);
  border: 2px inset var(--mint); padding: 6px;
}
.copy {
  margin-top: 6px; cursor: pointer;
  font: 12px var(--pixel);
  color: var(--paper); background: var(--emerald);
  border: 2px solid; border-color: var(--mint) var(--deep) var(--deep) var(--mint);
  padding: 3px 10px;
}
.copy:active { border-color: var(--deep) var(--mint) var(--mint) var(--deep); }

.counter {
  display: inline-flex; gap: 2px; margin-top: 4px;
}
.counter b {
  display: inline-block; min-width: 14px; text-align: center;
  font: 14px/20px var(--pixel); color: #7cff9e; background: #000; border: 1px solid #333;
}

.foot {
  padding: 12px 16px 16px;
  border-top: 3px solid var(--deep);
  background: var(--paper-2);
  font-size: 11px;
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
}
.foot .label { font-size: 12px; }

.construction {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  font: 12px var(--pixel); color: var(--ink);
  background: repeating-linear-gradient(-45deg, var(--gold) 0 10px, #111 10px 20px);
}
.construction span { background: var(--gold); padding: 2px 6px; border: 1px solid #111; }
.construction span + span { font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 12px; }

/* The cursor trail. */
.spark {
  position: fixed; z-index: 50; pointer-events: none;
  width: 6px; height: 6px; background: var(--gold);
  box-shadow: 0 -6px 0 -1px var(--gold), 0 6px 0 -1px var(--gold), -6px 0 0 -1px var(--gold), 6px 0 0 -1px var(--gold);
  animation: fall .8s steps(4) forwards;
}

@keyframes scroll { to { transform: translateX(-100%); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes flash { 50% { color: var(--gold); } }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes fall { to { transform: translateY(22px) scale(.3); opacity: 0; } }

@media (max-width: 760px) {
  /* Nav first, then the page, then the sidebar windows. */
  .layout { display: flex; flex-direction: column; }
  .side { display: contents; }
  .side > nav { order: 0; }
  .main { order: 1; }
  .side > .win { order: 2; }
  .banner .stars { display: none; }
  .two { grid-template-columns: 1fr; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { flex: 1 1 40%; text-align: center; }
  .banner .walker { width: 36px; height: 60px; right: 12px; }
  .side .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker span { padding-left: 0; white-space: normal; }
}
