/* Taxation — Mac OS 8 "Platinum" flavored, hand-written, zero dependencies.
   Upload this file next to index.html. Nothing here loads from another site. */

:root {
  --plat: #dddddd;      /* window / menu gray */
  --hi:   #ffffff;      /* bevel highlight */
  --lo:   #999999;      /* bevel shadow */
  --dk:   #777777;      /* sunken edge */
  --ink:  #000000;
  --desk: #7189a6;      /* desktop blue-gray */
  --link: #0000cc;
  --sel:  #9999cc;      /* text selection, like the Platinum "lavender" */

  --ui:   "Charcoal", "Geneva", "Lucida Grande", Verdana, sans-serif;
  --mono: "Monaco", "Andale Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 34px; }

body {
  margin: 0;
  font: 12px/1.55 var(--ui);
  color: var(--ink);
  background-color: var(--desk);
  /* faint 1-bit dither, like the old desktop patterns */
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%),
    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%);
  background-size: 4px 4px;
  background-position: 0 0, 2px 2px;
}

::selection { background: var(--sel); }

/* ---------- menu bar ---------- */
.menubar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  height: 22px;
  display: flex; align-items: stretch;
  background: var(--plat);
  border-bottom: 1px solid var(--ink);
  box-shadow: inset 0 1px 0 var(--hi);
}
.menubar a, .menubar .clock {
  display: flex; align-items: center;
  padding: 0 12px;
  color: var(--ink); text-decoration: none;
}
.menubar .site { font-weight: bold; }
.menubar a:hover, .menubar a:focus-visible { background: var(--ink); color: var(--hi); outline: none; }
.menubar .spacer { flex: 1; }
.menubar .clock { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.desktop {
  max-width: 960px;
  margin: 0 auto;
  padding: 44px 16px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0 18px;
  align-items: start;
}
.col { min-width: 0; }

/* ---------- window ---------- */
.win {
  background: var(--plat);
  border: 1px solid var(--ink);
  box-shadow:
    1px 1px 0 var(--ink),
    inset 1px 1px 0 var(--hi),
    inset -1px -1px 0 var(--lo);
  margin: 0 3px 18px 0;
}
.titlebar {
  height: 21px;
  margin: 3px 3px 0;
  padding: 0 4px;
  display: flex; align-items: center; gap: 6px;
  background: repeating-linear-gradient(to bottom, #f6f6f6 0 1px, #b4b4b4 1px 2px);
  border: 1px solid var(--ink);
  user-select: none;
}
.titlebar h2 {
  margin: 0 auto;
  padding: 0 10px;
  background: var(--plat);
  font: bold 12px/17px var(--ui);
}
.box {
  flex: none;
  width: 13px; height: 13px; padding: 0;
  background: var(--plat);
  border: 1px solid var(--ink);
  box-shadow: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo);
  cursor: pointer;
}
.box:active { background: var(--lo); box-shadow: none; }
.box.zoom { cursor: default; }
.box.zoom::after { content: ""; display: block; width: 5px; height: 5px; margin: 2px; border: 1px solid var(--ink); }

.body {
  margin: 3px;
  padding: 10px 14px 12px;
  background: var(--hi);
  border: 1px solid;
  border-color: var(--dk) var(--hi) var(--hi) var(--dk);
  max-height: 70vh;
  overflow: auto;
}
.win.shaded .body { display: none; }
.win.shaded { margin-bottom: 10px; }
.win.shaded .titlebar { margin-bottom: 3px; }

/* ---------- content ---------- */
.body p { margin: 0 0 .8em; }
.body p:last-child { margin-bottom: 0; }

a { color: var(--link); }
a:hover, a:focus-visible { background: var(--ink); color: var(--hi); text-decoration: none; outline: none; }

.entry { padding: 10px 0; border-bottom: 1px dotted var(--dk); }
.entry:first-child { padding-top: 0; }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }
.entry .date { font: bold 11px/1.4 var(--mono); margin: 0 0 4px; }
.entry .text { font: 12px/1.6 var(--mono); }
.entry .more { margin-top: 8px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 3px 0; }
.list li::before { content: "\25B8"; margin-right: 6px; }

.btn {
  display: inline-block;
  font: 12px/1 var(--ui);
  padding: 5px 16px;
  color: var(--ink); text-decoration: none;
  background: linear-gradient(#ffffff, #e6e6e6 50%, #c4c4c4);
  border: 1px solid var(--ink);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 1px 1px 0 rgba(0,0,0,.35);
  cursor: pointer;
}
.btn:hover { background: linear-gradient(#ffffff, #e6e6e6 50%, #c4c4c4); color: var(--ink); }
.btn:active { background: linear-gradient(#a8a8a8, #cfcfcf); box-shadow: inset 1px 1px 2px rgba(0,0,0,.4); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.embed {
  background: var(--hi);
  border: 1px solid; border-color: var(--dk) var(--hi) var(--hi) var(--dk);
  min-height: 120px;
  display: grid; place-items: center;
  text-align: center; padding: 10px;
  color: #444;
}
.embed iframe { display: block; width: 100%; border: 0; }

/* scrollbars: quiet Platinum-ish, so the black-on-gray look carries through */
.body { scrollbar-color: #bbbbbb #eeeeee; }
.body::-webkit-scrollbar { width: 16px; height: 16px; }
.body::-webkit-scrollbar-track { background: #eeeeee; border-left: 1px solid var(--dk); }
.body::-webkit-scrollbar-thumb { background: var(--plat); border: 1px solid var(--ink); box-shadow: inset 1px 1px 0 var(--hi); }

/* ---------- single post page ---------- */
body.photo {
  background-color: #1c2027;
  background-image: var(--photo, none);
  background-size: cover; background-position: center; background-attachment: fixed;
}
.post-wrap { max-width: 620px; margin: 0 auto; padding: 64px 16px 40px; }
.post-wrap .win { margin-right: 3px; }
.post-wrap .body { max-height: 62vh; }
.post-wrap .entry-title { font: bold 12px/1.4 var(--mono); border-bottom: 1px dashed var(--dk); padding-bottom: 6px; margin-bottom: 10px; }
.post-wrap .text { font: 12px/1.7 var(--mono); }
.post-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 4px; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .desktop { grid-template-columns: minmax(0, 1fr); }
  .body { max-height: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* =====================================================
   Additions: inner pages, archive, gallery, contact
   ===================================================== */

.menubar { overflow-x: auto; white-space: nowrap; }
.menubar a.current { font-weight: bold; }

/* generic single-column page */
.page { max-width: 720px; margin: 0 auto; padding: 44px 16px 40px; }
.page .win { margin-right: 3px; }
.page .body { max-height: none; }
.page h3 { font: bold 12px/1.4 var(--ui); margin: 1.2em 0 .4em; }
.page h3:first-child { margin-top: 0; }

/* blog archive */
.archive { list-style: none; margin: 0; padding: 0; }
.archive li { display: flex; gap: 14px; padding: 6px 0; border-bottom: 1px dotted var(--dk); }
.archive li:last-child { border-bottom: 0; }
.archive .d { flex: none; width: 96px; font: 11px/1.7 var(--mono); }

/* gallery */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.tile { display: block; color: inherit; text-decoration: none; }
.tile:hover, .tile:focus-visible { background: none; color: inherit; }
.tile:hover .cap, .tile:focus-visible .cap { background: var(--ink); color: var(--hi); }
.tile .cap { display: inline-block; margin-top: 5px; font-size: 11px; }
.thumb {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  overflow: hidden;
  color: #666; font-size: 11px;
  background-color: #efefef;
  background-image: repeating-linear-gradient(45deg, #e2e2e2 0 2px, transparent 2px 4px);
  border: 1px solid; border-color: var(--dk) var(--hi) var(--hi) var(--dk);
}
.thumb.wide { aspect-ratio: 4 / 3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.figure { margin: 0 0 14px; }
.figure figcaption { margin-top: 4px; font: 11px/1.5 var(--mono); }

/* label / value list (project details) */
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.meta dt { font-weight: bold; }
dl.meta dd { margin: 0; }

/* embeds that need more room (guestbook, full album players) */
.embed.tall { min-height: 320px; }
.embed.tall iframe { height: 320px; }

.hint { color: #555; font-size: 11px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

@media (max-width: 760px) {
  .menubar .clock { display: none; }
  .archive li { flex-direction: column; gap: 0; }
}
