/* ===========================================================
   Hendrikvh's Home Page — stylesheet
   A late-90s consumer-web look (MapQuest-era boxes, MySpace-era
   sidebar) built on modern, responsive, accessible CSS underneath.
   =========================================================== */

:root {
  --gold: #f2c94c;
  --gold-dark: #c99a1f;
  --maroon: #7a1f2b;
  --maroon-dark: #551621;
  --paper: #fbf6e8;
  --paper-edge: #e9dfc4;
  --ink: #1b1b1b;
  --link-blue: #0000ee;
  --link-visited: #551a8b;
  --teal: #0b6e6e;

  /* 4x4 ordered-dither tile: 1px black + 1px white specks on a checker,
     layered over flat fills so they read like a 256-colour GIF instead
     of a smooth modern gradient. */
  --dither: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'><rect x='0' y='0' width='1' height='1' fill='%23000' opacity='0.17'/><rect x='2' y='2' width='1' height='1' fill='%23000' opacity='0.17'/><rect x='2' y='0' width='1' height='1' fill='%23fff' opacity='0.13'/><rect x='0' y='2' width='1' height='1' fill='%23fff' opacity='0.13'/></svg>");
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

html {
  background: #d3ddec;
}

body {
  margin: 0;
  background-color: #d3ddec;
  background-image: url("/images/bgsky01.jpg");
  background-repeat: repeat;
  color: var(--ink);
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: var(--link-blue);
}

a:visited {
  color: var(--link-visited);
}

a:hover,
a:focus-visible {
  color: var(--maroon);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: "Times New Roman", Times, Georgia, serif;
  font-weight: 700;
  font-style: italic;
  line-height: 1.2;
}

p {
  max-width: 62ch;
}

/* ---------- Ticker ---------- */

.ticker-bar {
  background-color: var(--maroon);
  background-image: var(--dither);
  background-size: 4px 4px;
  color: var(--gold);
  border-bottom: 3px solid var(--maroon-dark);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 4px 0;
}

.ticker-bar marquee {
  display: block;
}

/* ---------- Banner ---------- */

.banner {
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  background: transparent;
}

.site-title {
  margin: 0;
  line-height: 0;
}

.site-title .wordart {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.tagline {
  margin: 0.75rem auto 0;
  max-width: 46ch;
  font-style: italic;
  color: var(--maroon-dark);
}

/* ---------- Layout ---------- */

.layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.sidebar {
  flex: 0 0 220px;
  background-color: var(--gold);
  background-image: var(--dither),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.22) 0,
      rgba(255, 255, 255, 0.22) 2px,
      transparent 2px,
      transparent 13px
    );
  background-size: 4px 4px, auto;
  border-right: 4px solid var(--maroon);
  padding: 1.25rem 1rem 2rem;
}

.sidebar-heading {
  margin: 0 0 0.5rem;
  font-weight: bold;
  text-align: center;
  color: var(--maroon-dark);
}

.sidebar ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.sidebar li {
  margin-bottom: 0.4rem;
}

.sidebar a {
  text-decoration: none;
  font-weight: bold;
}

.sidebar a:hover,
.sidebar a:focus-visible {
  text-decoration: underline;
}

.content {
  flex: 1 1 420px;
  min-width: 0;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---------- Panels ---------- */

.panel {
  background: #fff;
  border: 3px solid var(--maroon);
  box-shadow: 4px 4px 0 var(--gold-dark);
}

.panel-header {
  margin: 0;
  background-color: var(--maroon);
  background-image: var(--dither);
  background-size: 4px 4px;
  color: var(--gold);
  padding: 0.5rem 0.9rem;
  font-size: 1.3rem;
}

.panel-body {
  padding: 1rem 1.1rem 1.25rem;
}

.panel-body > *:first-child {
  margin-top: 0;
}

.badge-new {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 0.6em;
  letter-spacing: 0.06em;
  padding: 0.1em 0.45em;
  border-radius: 2px;
  vertical-align: middle;
  animation: pulse 1.6s ease-in-out infinite;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* ---------- Animated divider ---------- */

/* A period animated "fire" dividing-line GIF, stretched to the full width
   of whatever it separates. */
.divider {
  height: 26px;
  /* Small gap from the box above; overlap the box below so the flames
     sit right on top of the maroon panel. */
  margin: 0.7rem 0 -4px;
  border: 0;
  position: relative;
  z-index: 1;
  background: url("/images/divider.gif") no-repeat center;
  background-size: 100% 100%;
}

/* ---------- "Best viewed with ANY BROWSER" button ---------- */

.browser-badge {
  display: block;
  width: 176px;
  height: auto;
  margin: 0.85rem auto 0;
  image-rendering: pixelated;
}

/* ---------- Projects ---------- */

.project {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px dashed var(--paper-edge);
}

.project:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.project h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: var(--maroon-dark);
}

.project-img {
  float: right;
  width: 130px;
  height: auto;
  margin: 0.1rem 0 0.5rem 1rem;
  border: 3px solid;
  border-color: #fff #9c9c9c #9c9c9c #fff;
}

/* "As seen on TV"-style starburst seal for a project's stats. */
.tv-badge {
  float: right;
  width: 116px;
  height: 116px;
  margin: 0.2rem -0.3rem 0.4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #d81f27;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-9deg);
  clip-path: polygon(
    50% 0%, 57.29% 8.64%, 67.1% 3.02%, 71% 13.63%, 82.14% 11.7%, 82.17% 23%,
    93.3% 25%, 89.47% 35.64%, 99.24% 41.32%, 92% 50%, 99.24% 58.68%,
    89.47% 64.36%, 93.3% 75%, 82.17% 77%, 82.14% 88.3%, 71% 86.37%,
    67.1% 96.98%, 57.29% 91.36%, 50% 100%, 42.71% 91.36%, 32.9% 96.98%,
    29% 86.37%, 17.86% 88.3%, 17.83% 77%, 6.7% 75%, 10.53% 64.36%,
    0.76% 58.68%, 8% 50%, 0.76% 41.32%, 10.53% 35.64%, 6.7% 25%,
    17.83% 23%, 17.86% 11.7%, 29% 13.63%, 32.9% 3.02%, 42.71% 8.64%
  );
}

.tv-badge__pre {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tv-badge__big {
  font-size: 30px;
  font-weight: 900;
  margin: 2px 0;
}

.tv-badge__post {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

/* Image + starburst together: the seal hangs off the top-right corner,
   overlapping only slightly. */
.project-figure {
  float: right;
  position: relative;
  width: 150px;
  margin: 1.7rem 0.9rem 0.6rem 1.3rem;
}

.project-figure .project-img {
  float: none;
  display: block;
  width: 100%;
  margin: 0;
}

.project-figure .tv-badge {
  float: none;
  position: absolute;
  top: -38px;
  right: -32px;
  width: 74px;
  height: 74px;
  margin: 0;
}

.project-figure .tv-badge__pre,
.project-figure .tv-badge__post {
  font-size: 7px;
}

.project-figure .tv-badge__big {
  font-size: 18px;
}

.tag {
  font-family: Georgia, serif;
  font-size: 0.6em;
  font-weight: normal;
  font-style: italic;
  color: var(--teal);
  vertical-align: middle;
}

/* Chunky raised bevel, à la a Win95 toolbar button: light highlight on the
   top/left edges, dark shadow on the bottom/right, and it inverts when
   pressed. */
.go-btn {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 1.45rem;
  background-color: #47a6a6;
  background-image: var(--dither);
  background-size: 4px 4px;
  color: #000 !important;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 0.95rem;
  border: 3px solid;
  border-color: #9fdcdc #0f4344 #0f4344 #9fdcdc;
  box-shadow: inset 2px 2px 0 #75c6c6, inset -2px -2px 0 #12494a,
    1px 1px 0 #000;
}

.go-btn:hover,
.go-btn:focus-visible {
  color: #000 !important;
  background-color: #55b9b9;
}

.go-btn:active {
  border-color: #0f4344 #9fdcdc #9fdcdc #0f4344;
  box-shadow: inset 2px 2px 0 #12494a, inset -2px -2px 0 #75c6c6,
    1px 1px 0 #000;
}

/* ---------- Blog lists ---------- */

.blog-teaser-list,
.blog-index-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.blog-teaser-list li {
  margin-bottom: 0.6rem;
}

.post-date {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85em;
  color: var(--maroon-dark);
}

.blog-teaser-list .post-date {
  display: inline-block;
  min-width: 9.5em;
}

.blog-index-item {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px dashed var(--paper-edge);
}

.blog-index-item:last-child {
  border: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.blog-index-item h3 {
  margin: 0 0 0.15rem;
  font-size: 1.2rem;
}

.post-body h2 {
  color: var(--maroon-dark);
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

.post-body ul {
  padding-left: 1.3rem;
}

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

.construction-badge {
  margin-top: 1.5rem;
  padding: 0.5rem;
  background: repeating-linear-gradient(
    45deg,
    #1b1b1b 0,
    #1b1b1b 10px,
    #f2c94c 10px,
    #f2c94c 20px
  );
  border: 2px solid var(--ink);
  text-align: center;
}

.construction-icon {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.construction-text {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: bold;
  line-height: 1.3;
  padding: 0.4rem 0.35rem;
  border: 1px solid var(--ink);
}

.hit-counter {
  margin-top: 1.25rem;
  text-align: center;
}

.hit-counter-label {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--maroon-dark);
}

.hit-counter-digits {
  display: inline-block;
  background: #111;
  color: #ff3b3b;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--maroon-dark);
  border-radius: 3px;
}

/* ---------- Yard (bottom decoration) ---------- */

.yard {
  background-color: #d3ddec;
  text-align: center;
  padding: 0.75rem 0.5rem 1rem;
  line-height: 0;
}

.yard-fence {
  display: block;
  width: 100%;
  max-width: 656px;
  height: auto;
  margin: 0 auto;
}

.yard-dog {
  display: block;
  width: 45%;
  max-width: 240px;
  height: auto;
  margin: 0.25rem auto 0;
}

.yard-paws {
  display: block;
  width: 70%;
  max-width: 360px;
  height: auto;
  margin: 0.25rem auto 0;
}

/* ---------- Footer ---------- */

footer {
  background-color: var(--maroon);
  background-image: var(--dither);
  background-size: 4px 4px;
  color: var(--gold);
  text-align: center;
  padding: 1.25rem 1rem 1.75rem;
}

.footer-nav {
  margin: 0 0 0.6rem;
  font-weight: bold;
}

.footer-nav a {
  color: #fff;
}

.footer-nav a:visited {
  color: #fff;
}

.fine-print {
  margin: 0;
  font-size: 0.75rem;
  color: #e9d9a8;
}

.fine-print a {
  color: inherit;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  /* Single column: stretch makes both the sidebar and the content fill the
     full width instead of shrinking to their content. */
  .layout {
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar,
  .content {
    flex: 0 0 auto;
    width: 100%;
  }

  .sidebar {
    border-right: none;
    border-bottom: 4px solid var(--maroon);
  }

  .sidebar ul {
    margin-bottom: 1rem;
  }

  /* Keep the badge + counter from going edge-to-edge; center them under
     the site map. */
  .construction-badge,
  .hit-counter {
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
  }
}
