/* saikoneru.me: a hand-made homepage, circa 1999, written in 2026.
   No frameworks, no JavaScript. Just a stylesheet. */

:root {
  --desktop: #2f6f73;
  --paper: #fffdf3;
  --paper-dark: #f2ecd8;
  --ink: #1b1b1b;
  --muted: #6b6450;
  --rule: #b8b09a;
  --navy: #000080;
  --win-grey: #d4d0c8;
  --link: #0000ee;
  --visited: #551a8b;
  --hover: #c00000;
  --serif: "Times New Roman", Times, Georgia, serif;
  --sans: Verdana, Tahoma, Geneva, sans-serif;
  --mono: "Courier New", Courier, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  padding: 24px 12px 40px;
  color: var(--ink);
  font: 18px/1.55 var(--serif);
  /* tiled background, the 1999 way, minus the GIF */
  background-color: var(--desktop);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1.5px),
    radial-gradient(rgba(0, 0, 0, 0.10) 1px, transparent 1.5px);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}

/* ---------- links ---------- */

a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { color: var(--hover); }
a:active { color: #ff0000; }

:focus-visible {
  outline: 1px dotted #000;
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 4px 8px;
  background: #ffffe1;
  border: 1px solid #000;
  font: 13px var(--sans);
  z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- the page "window" ---------- */

.page {
  max-width: 800px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid #000;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #808080,
    5px 5px 0 rgba(0, 0, 0, 0.35);
}

.titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 3px 3px 8px;
  background: linear-gradient(90deg, var(--navy), #1084d0);
  color: #fff;
  font: bold 12px var(--sans);
  letter-spacing: 0.02em;
}

.titlebar-buttons { display: flex; gap: 2px; }

.titlebar-buttons span {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 14px;
  background: var(--win-grey);
  color: #000;
  font: bold 10px/1 var(--sans);
  box-shadow:
    inset -1px -1px 0 #404040,
    inset 1px 1px 0 #fff;
}

.masthead-body {
  padding: 22px 24px 18px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.018) 3px 4px),
    var(--paper);
}

.masthead h1 {
  margin: 0;
  font: bold 42px/1.1 var(--serif);
  color: #1a1a5e;
  text-shadow: 2px 2px 0 #d9d2bb;
}

.tagline {
  margin: 8px 0 0;
  font-style: italic;
  color: var(--muted);
}

/* ---------- two columns ---------- */

.layout {
  display: grid;
  grid-template-columns: 190px 1fr;
}

.sidebar {
  padding: 18px 14px;
  background: var(--paper-dark);
  border-right: 1px dotted var(--rule);
}

.box {
  margin-bottom: 18px;
  background: var(--paper);
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #fff;
}

.box-title {
  margin: 0;
  padding: 2px 6px;
  background: var(--win-grey);
  border-bottom: 1px solid #808080;
  font: bold 11px var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.box p { margin: 8px; }

.menu {
  list-style: none;
  margin: 0;
  padding: 8px;
}

.menu li + li { margin-top: 6px; }

/* menu links look like little beveled buttons */
.menu a,
.menu a:visited {
  display: block;
  padding: 3px 8px;
  background: var(--win-grey);
  color: #000;
  text-decoration: none;
  font: 13px var(--sans);
  box-shadow:
    inset -1px -1px 0 #404040,
    inset 1px 1px 0 #fff,
    inset -2px -2px 0 #808080;
}

.menu a::before { content: "\00bb\00a0"; }

.menu a:hover { color: var(--navy); text-decoration: underline; }

.menu a:active {
  box-shadow:
    inset 1px 1px 0 #404040,
    inset -1px -1px 0 #fff,
    inset 2px 2px 0 #808080;
  padding: 4px 7px 2px 9px;
}

/* calm, non-blinking "under construction" sign */
.construction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
  padding: 6px;
  background: #fff8d6;
  border: 1px solid #000;
  text-align: center;
}

.stripes {
  display: block;
  width: 100%;
  height: 7px;
  background: repeating-linear-gradient(-45deg, #f2c200 0 6px, #222 6px 12px);
}

.odometer { text-align: center; }

.digits {
  display: inline-flex;
  gap: 1px;
  margin-left: 4px;
  padding: 2px;
  background: #000;
  vertical-align: middle;
}

.digits span {
  display: inline-block;
  width: 14px;
  padding: 1px 0;
  background: linear-gradient(#222, #000 50%, #222);
  color: #7cfc7c;
  font: bold 14px/1 var(--mono);
  text-align: center;
}

/* ---------- main content ---------- */

.content { padding: 18px 28px 26px; min-width: 0; }

.content h2 {
  margin: 0 0 10px;
  font: bold 28px/1.2 var(--serif);
  font-variant: small-caps;
  color: #800000;
  border-bottom: 3px double var(--rule);
}

.content p { margin: 0 0 12px; }

hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid #a9a28c;
  border-bottom: 1px solid #fff;
}

.small { font: 12px/1.5 var(--sans); }
.muted { color: var(--muted); }

.project {
  margin: 0 0 16px;
  padding: 12px 14px 10px;
  background: #fff;
  border: 1px dashed #c3b99b;
}

.project h3 {
  margin: 0 0 6px;
  font: bold 21px/1.25 var(--serif);
}

.project h3::before {
  content: "\25B8\00a0";
  color: #800000;
  font-size: 0.8em;
}

.year {
  font: normal 13px var(--mono);
  color: var(--muted);
}
.year::before { content: "["; }
.year::after { content: "]"; }

.project p { margin-bottom: 8px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  font: 12px/1.6 var(--sans);
}

.tech {
  padding: 0 6px;
  background: var(--paper-dark);
  border: 1px solid #ddd3b6;
  font: 12px/1.6 var(--mono);
}

/* ---------- footer & 88x31 badges ---------- */

.footer {
  padding: 16px 16px 12px;
  border-top: 1px solid var(--rule);
  background: var(--paper-dark);
  text-align: center;
}

.footer p { margin: 4px 0; }

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 88px;
  height: 31px;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5), inset -1px -1px 0 rgba(0, 0, 0, 0.35);
  text-align: center;
  line-height: 1;
  overflow: hidden;
}

.badge span { font: 8px/1.1 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }
.badge b { font: bold 12px/1.1 var(--sans); }

.badge-html { background: #e44d26; color: #fff; }
.badge-css  { background: #264de4; color: #fff; }
.badge-nojs { background: #000; color: #f7df1e; }
.badge-any  { background: var(--win-grey); color: var(--navy); }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  body { padding: 10px 6px 24px; font-size: 17px; }

  .masthead h1 { font-size: 30px; }

  .layout { grid-template-columns: 1fr; }

  /* content first on phones; the sidebar drops below it */
  .sidebar {
    order: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-right: 0;
    border-top: 1px dotted var(--rule);
  }

  .sidebar > * { margin-bottom: 0; }

  .construction,
  .odometer { grid-column: span 1; }

  .content { padding: 16px 16px 20px; }
}

/* ---------- 404 dialog ---------- */

.page-narrow { max-width: 460px; margin-top: 12vh; }

.dialog { display: flex; gap: 18px; align-items: flex-start; }

.dialog h1 { margin: 0 0 8px; font: bold 22px/1.2 var(--serif); }

.dialog-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 4px 0 0;
  border-radius: 50%;
  background: #f2c200;
  border: 1px solid #000;
  font: bold 26px/1 var(--serif);
}

.button,
.button:visited {
  display: inline-block;
  padding: 4px 16px;
  background: var(--win-grey);
  color: #000;
  text-decoration: none;
  font: 13px var(--sans);
  box-shadow:
    inset -1px -1px 0 #404040,
    inset 1px 1px 0 #fff,
    inset -2px -2px 0 #808080;
}

.button:active {
  box-shadow:
    inset 1px 1px 0 #404040,
    inset -1px -1px 0 #fff,
    inset 2px 2px 0 #808080;
}

.project .subtitle {
  margin: -2px 0 8px;
  font-style: italic;
  color: var(--muted);
}
