@font-face {
  font-family: "Xanh Mono";
  src:
    url("/assets/fonts/xanh-mono/XanhMono-Regular.ttf")
    format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Xanh Mono";
  src:
    url("/assets/fonts/xanh-mono/XanhMono-Italic.ttf")
    format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Share Tech Mono";
  src:
    url("/assets/fonts/share-tech-mono/ShareTechMono-Regular.ttf")
    format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}


:root {
  --paper: #f4f0e7;
  --outside: #e9e5dc;
  --ink: #080807;
  --line: #2a2a28;
  --soft-line: #a7a39b;

  --green: #294d39;

  --tag-guides: #536a59;
  --tag-lab: #75644e;
  --tag-tutorials: #536a72;
  --tag-security: #7a5552;
  --tag-case-studies: #665b72;
  --tag-events: #756841;
  --tag-notes: #646464;

  --serif:
    Georgia,
    "Times New Roman",
    serif;

  --text:
    "Xanh Mono",
    "Courier New",
    Courier,
    monospace;

  --code:
    "Share Tech Mono",
    "Courier New",
    Courier,
    monospace;
}


/* ---------------------------------------------------------
   GLOBAL
   --------------------------------------------------------- */

* {
  box-sizing: border-box;
}


html {
  background: var(--outside);
  color: var(--ink);
}


body {
  margin: 0;

  background: var(--outside);
  font-family: var(--text);
}


a {
  color: inherit;
  text-decoration: none;
}


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


img {
  display: block;
  max-width: 100%;
}


.site-shell {
  width: min(1500px, calc(100% - 26px));
  min-height: calc(100vh - 32px);

  margin: 16px auto;

  display: flex;
  flex-direction: column;

  background: var(--paper);

  border:
    1px solid
    var(--line);
}


.sr-only {
  position: absolute;

  width: 1px;
  height: 1px;

  margin: -1px;
  padding: 0;

  overflow: hidden;

  clip-path: inset(50%);

  white-space: nowrap;

  border: 0;
}


/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.site-header {
  border-bottom:
    1px solid
    var(--line);
}


.header-top {
  min-height: 135px;

  display: grid;

  grid-template-columns:
    minmax(390px, 2fr)
    minmax(255px, .95fr)
    1px
    minmax(255px, .95fr)
    minmax(165px, .58fr);

  column-gap: 24px;

  align-items: center;

  padding:
    17px
    27px;
}


.site-brand {
  display: flex;

  flex-direction: column;

  align-items: flex-start;
}


.site-brand:hover {
  text-decoration: none;
}


.site-title {
  font-family: var(--serif);

  font-size:
    clamp(
      3rem,
      5.25vw,
      5.45rem
    );

  line-height: .9;

  letter-spacing: -.055em;
}


.site-subtitle {
  margin-top: 14px;

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;

  letter-spacing: .055em;

  text-transform: uppercase;
}


.unix-motto {
  align-self: center;
  justify-self: end;

  display: flex;

  align-items: center;

  gap: 16px;
}


.dharma-mark {
  display: block;

  width: 58px;
  height: 58px;

  flex: 0 0 58px;

  object-fit: contain;
}


.motto-copy {
  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;

  line-height: 1.55;
}


.japanese-motto {
  margin: 0;

  align-self: center;
  justify-self: start;

  color: var(--green);

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;

  line-height: 1.65;
}


.motto-separator {
  align-self: center;

  width: 1px;
  height: 46px;

  background: var(--line);
}


.header-search {
  position: relative;

  width: 165px;

  align-self: center;
  justify-self: end;

  display: grid;

  grid-template-columns:
    1fr
    40px;

  border:
    1px solid
    var(--line);
}


.header-search input,
.header-search button {
  height: 38px;

  border: 0;

  color: var(--ink);

  background: transparent;

  opacity: 1;
}


.header-search input {
  min-width: 0;

  padding:
    0
    10px;

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;
}


.header-search button {
  display: flex;

  align-items: center;
  justify-content: center;

  padding: 0;

  border-left:
    1px solid
    var(--line);

  font-size: 1.1rem;
}


/* ---------------------------------------------------------
   NAVIGATION
   --------------------------------------------------------- */

.main-nav {
  min-height: 52px;

  display: grid;

  grid-template-columns:
    repeat(5, minmax(125px, 180px))
    1fr
    56px
    56px;

  border-top:
    1px solid
    var(--line);
}


.main-nav > * {
  min-height: 52px;

  display: flex;

  align-items: center;
  justify-content: center;
}


.main-nav a {
  border-right:
    1px solid
    var(--line);

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;
}


.main-nav a.active {
  color: var(--paper);

  background: var(--green);
}


.nav-utility {
  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;
}


/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

#main-content {
  flex: 1 0 auto;

  padding: 0;
}


.hero-grid {
  min-height: 425px;

  display: grid;

  grid-template-columns:
    55%
    45%;

  border-bottom:
    1px solid
    var(--line);
}


.hero-art {
  position: relative;

  min-height: 425px;

  overflow: hidden;

  border-right:
    1px solid
    var(--line);

  background: var(--paper);
}


.hero-pattern {
  position: absolute;

  inset:
    15px
    18px;

  opacity: .28;

  background-image:
    url("/assets/images/site/pattern-waves.svg");

  background-repeat: repeat;

  background-size:
    120px
    18px;
}


/*
 * Hero artwork:
 *
 * assets/images/hero/unix-mage.png
 *
 * It deliberately does NOT include the pattern.
 */
.hero-character {
  position: absolute;

  z-index: 2;

  left: 50%;
  bottom: -13px;

  width: auto;
  height: 108%;

  max-width: none;

  transform: translateX(-50%);

  object-fit: contain;

  pointer-events: none;
}


/* ---------------------------------------------------------
   FEATURED
   --------------------------------------------------------- */

.featured-post {
  min-width: 0;

  display: flex;

  flex-direction: column;

  padding:
    32px
    32px
    29px;
}


.featured-meta {
  display: flex;

  justify-content: space-between;

  gap: 22px;

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;
}


.featured-label {
  display: flex;

  align-items: center;
}


.featured-dot {
  width: 9px;
  height: 9px;

  margin-right: 9px;

  border-radius: 50%;

  background: var(--green);
}


.featured-post h1 {
  margin:
    28px
    0
    20px;

  font-family: var(--text);

  font-size:
    clamp(
      2.25rem,
      3.25vw,
      3.7rem
    );

  line-height: 1.04;

  font-weight: 400;
}


.featured-post > p {
  margin: 0;

  max-width: 650px;

  padding-top: 17px;

  border-top:
    1px solid
    var(--line);

  font-family: var(--text);

  font-size: 1rem;

  line-height: 1.55;

  letter-spacing: .065em;

  text-transform: uppercase;
}


.featured-bottom {
  margin-top: auto;

  padding-top: 26px;

  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 20px;

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;
}


.featured-button {
  padding:
    11px
    15px;

  border:
    1px solid
    var(--line);
}


.featured-button:hover,
.featured-button:focus-visible {
  text-decoration: none;
}


/* ---------------------------------------------------------
   LOWER GRID
   --------------------------------------------------------- */

.lower-grid {
  display: grid;

  grid-template-columns:
    61.5%
    38.5%;

  align-items: stretch;
}


.recent-posts {
  padding:
    0
    20px
    14px;

  border-right:
    1px solid
    var(--line);
}


.terminal-panel {
  padding:
    0
    13px
    13px;
}


.panel-header {
  height: 42px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 16px;

  border-bottom:
    1px solid
    var(--line);

  font-family: var(--text);
}


.panel-header h2 {
  margin: 0;

  font-size: 1rem;
}


.panel-header a,
.panel-header > span {
  font-size: 1rem;
  font-weight: 400;
}


.panel-marker {
  display: inline-block;

  width: 9px;
  height: 9px;

  margin-right: 7px;

  background: var(--green);
}


/* ---------------------------------------------------------
   RECENT POSTS
   --------------------------------------------------------- */

.recent-row {
  min-height: 61px;

  display: grid;

  grid-template-columns:
    55px
    minmax(0, 1fr)
    minmax(82px, auto)
    80px;

  gap: 13px;

  align-items: center;

  border-bottom:
    1px solid
    var(--soft-line);
}


.recent-row:last-child {
  border-bottom: 0;
}


.recent-row time {
  height: 45px;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  border-right:
    1px solid
    var(--line);

  color: var(--green);

  font-family: var(--text);
}


.recent-row time span {
  font-size: 1rem;
}


.recent-row time strong {
  font-size: 1.2rem;

  line-height: 1;
}


.recent-copy {
  min-width: 0;
}


.recent-copy h3 {
  margin:
    0
    0
    4px;

  font-size: 1rem;
}


.recent-copy p {
  margin: 0;

  font-size: 1rem;

  line-height: 1.3;
}


.post-tag {
  justify-self: end;

  padding:
    4px
    7px;

  border:
    1px solid
    currentColor;

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;

  white-space: nowrap;
}


.tag--guides {
  color: var(--tag-guides);
}


.tag--lab-notes {
  color: var(--tag-lab);
}


.tag--tutorials {
  color: var(--tag-tutorials);
}


.tag--security {
  color: var(--tag-security);
}


.tag--case-studies {
  color: var(--tag-case-studies);
}


.tag--events {
  color: var(--tag-events);
}


.tag--notes {
  color: var(--tag-notes);
}


.read-time {
  justify-self: end;

  font-family: var(--text);

  font-size: 1rem;

  white-space: nowrap;
}


/* ---------------------------------------------------------
   TERMINAL
   --------------------------------------------------------- */

.terminal-window {
  height: auto;
  overflow: hidden;

  background: #151515;
  color: #eeeeea;
}


.terminal-window > a {
  display: block;
  width: 100%;
  height: auto;
}


.terminal-window img,
.terminal-window video {
  display: block;
  width: 100%;
  height: auto;

  object-fit: contain;
  object-position: top left;
}


.terminal-window pre {
  height: 100%;

  margin: 0;

  padding: 15px;

  overflow: auto;

  font-family: var(--text);

  font-size: 1rem;

  line-height: 1.45;
}


/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

.site-footer {
  min-height: 56px;

  border-top:
    1px solid
    var(--line);

  display: grid;

  grid-template-columns:
    12%
    7%
    45%
    36%;

  align-items: stretch;
}


.site-footer > * {
  min-width: 0;

  padding:
    6px
    10px;

  border-right:
    1px solid
    var(--soft-line);
}


.site-footer > *:last-child {
  border-right: 0;
}


.footer-brand,
.footer-connect {
  display: flex;

  flex-direction: column;

  gap: 2px;

  font-family: var(--text);

  font-size: 1rem;
  line-height: 1.15;
}


.footer-connect {
  align-items: flex-start;
  justify-content: center;

  text-align: left;
}


.footer-connect a {
  display: block;
  width: max-content;
}


.footer-brand strong,
.footer-connect strong {
  margin-bottom: 2px;

  font-size: 1rem;
}


.footer-patterns {
  display: grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap: 6px;

  align-items: center;
}


.footer-pattern {
  height: 36px;
  min-height: 0;

  border:
    1px solid
    var(--soft-line);

  background-color: transparent;
}


.pattern-one {
  background-image:
    url("/assets/images/site/pattern-crosses.svg");

  background-repeat: repeat;

  background-size:
    12px
    12px;

  background-position:
    -3px
    -1px;
}


.pattern-two {
  background-image:
    url("/assets/images/site/pattern-dots.svg");

  background-repeat: repeat;

  background-size:
    7px
    7px;

  background-position:
    -2px
    -4px;
}


.pattern-three {
  background-image:
    url("/assets/images/site/pattern-diagonal.svg");

  background-repeat: repeat;

  background-size:
    8px
    8px;
}


.pattern-four {
  background-image:
    url("/assets/images/site/pattern-circles.svg");

  background-repeat: no-repeat;

  background-position: center;

  background-size:
    88%
    88%;
}


.footer-about {
  display: grid;

  grid-template-columns:
    52px
    max-content;

  column-gap: 30px;

  align-items: center;
  justify-content: center;
}


.puffer-mark {
  width: 52px;
  height: 52px;

  background-image:
    url("/assets/images/site/puffer.png");

  background-repeat: no-repeat;
  background-position: 54% center;
  background-size: 176% auto;
}


.footer-about p {
  margin: 0;

  font-size: 1rem;

  line-height: 1.22;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 1050px) {

  .header-top {
    grid-template-columns:
      1.5fr
      1fr;
  }


  .header-search {
    justify-self: start;
  }


  .hero-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }


  .hero-art,
  .recent-posts {
    border-right: 0;

    border-bottom:
      1px solid
      var(--line);
  }


  .site-footer {
    grid-template-columns:
      1fr
      1fr;
  }

}


@media (max-width: 700px) {

  .site-shell {
    width: 100%;

    border-left: 0;
    border-right: 0;
  }


  .header-top {
    grid-template-columns: 1fr;
  }


  .japanese-motto {
    padding-left: 0;

    border-left: 0;
  }


  .main-nav {
    grid-template-columns:
      repeat(2, 1fr);
  }


  .nav-fill {
    display: none;
  }


  .hero-art {
    min-height: 330px;
  }


  .featured-post {
    padding:
      26px
      21px;
  }


  .recent-row {
    grid-template-columns:
      50px
      minmax(0, 1fr);

    padding:
      8px
      0;
  }


  .post-tag,
  .read-time {
    grid-column: 2;

    justify-self: start;
  }


  .site-footer {
    grid-template-columns: 1fr;
  }


  .site-footer > * {
    border-right: 0;

    border-bottom:
      1px solid
      var(--soft-line);
  }

}

/*
 * Footer pattern tiles are intentionally element-agnostic.
 * They can later be changed from <span> to <a> without
 * affecting layout or appearance.
 */
.footer-pattern {
  display: block;
  width: 100%;
  text-decoration: none;
}

a.footer-pattern:hover,
a.footer-pattern:focus-visible {
  text-decoration: none;
}


/* ---------------------------------------------------------
   POSTS
   --------------------------------------------------------- */

.post-page {
  width: min(920px, calc(100% - 48px));

  margin: 0 auto;

  padding:
    54px
    0
    85px;
}


.post-header {
  padding-bottom: 26px;

  border-bottom:
    1px solid
    var(--line);
}


.post-section {
  margin: 0;

  color: var(--green);

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;

  letter-spacing: .06em;

  text-transform: uppercase;
}


.post-header h1 {
  margin:
    16px
    0
    24px;

  font-family: var(--text);

  font-size:
    clamp(
      2.3rem,
      5vw,
      4.2rem
    );

  line-height: 1.04;
}


.post-meta {
  display: flex;

  justify-content: space-between;

  gap: 20px;

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;
}


.post-terminal-image {
  margin:
    38px
    0;
}


.post-terminal-image img {
  width: 100%;

  border:
    1px solid
    var(--line);

  background: #080808;
}


.post-terminal-image figcaption {
  margin-top: 8px;

  font-family: var(--text);

  font-size: 1rem;
}


.post-body {
  font-size: 1rem;

  line-height: 1.72;
}


.post-body h2,
.post-body h3 {
  margin-top: 2.2em;

  font-family: var(--text);
}


.post-body h2 {
  padding-bottom: 8px;

  border-bottom:
    1px solid
    var(--line);
}


.post-body code {
  font-family: var(--text);
}


.post-body pre {
  margin:
    24px
    0;

  padding: 18px;

  overflow-x: auto;

  border:
    1px solid
    var(--line);

  background: #080808;

  color: #eeeeea;
}


.post-body blockquote {
  margin:
    25px
    0;

  padding:
    4px
    0
    4px
    18px;

  border-left:
    4px solid
    var(--green);
}


@media (max-width: 700px) {

  .post-page {
    width: calc(100% - 32px);

    padding-top: 35px;
  }

}


/* ---------------------------------------------------------
   TERMINAL MEDIA
   --------------------------------------------------------- */

.post-terminal-media {
  margin:
    38px
    0;
}

.post-terminal-media img,
.post-terminal-media video {
  display: block;
  width: 100%;

  border:
    1px solid
    var(--line);

  background: #080808;
}

.post-terminal-media figcaption {
  margin-top: 8px;

  font-family: var(--text);

  font-size: 1rem;
}


/* Terminal animation loading state */
img.terminal-animation {
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;

  font-size: 0;
  color: transparent;

  background: #151515;

  /* Match the active FVWM window border. */
  border: 8px solid #282828;
}

/* Site search results */
.header-search button {
  cursor: pointer;
}

.search-results {
  position: absolute;

  z-index: 50;

  top: calc(100% + 7px);
  right: 0;

  width: min(380px, calc(100vw - 32px));

  border:
    1px solid
    var(--line);

  background: var(--paper);

  font-family: var(--text);

  text-align: left;
}

.search-results[hidden] {
  display: none;
}

.search-results ul {
  margin: 0;
  padding: 0;

  list-style: none;
}

.search-results li + li {
  border-top:
    1px solid
    var(--soft-line);
}

.search-results a {
  display: block;

  padding:
    11px
    13px;
}

.search-results a:hover,
.search-results a:focus-visible {
  text-decoration: none;

  background: #e9e5dc;
}

.search-results strong,
.search-results span {
  display: block;
}

.search-results strong {
  margin-bottom: 4px;

  font-size: 1rem;
}

.search-results span {
  color: var(--green);

  font-size: 1rem;
  font-weight: 400;

  text-transform: uppercase;
}

.search-message {
  margin: 0;

  padding:
    12px
    13px;

  font-size: 1rem;
  font-weight: 400;
}

@media (max-width: 1050px) {
  .search-results {
    right: auto;
    left: 0;
  }
}

/* Footer text links */
.footer-connect a,
.footer-about a {
  text-decoration: none;
}

.footer-connect a:hover,
.footer-connect a:focus-visible,
.footer-about a:hover,
.footer-about a:focus-visible {
  text-decoration: underline;
}


/* Keep the centered about layout from overflowing narrow screens. */
@media (max-width: 700px) {
  .footer-about {
    grid-template-columns:
      48px
      minmax(0, 1fr);

    justify-content: start;
  }
}

/* Footer vertical alignment */
.footer-brand,
.footer-connect {
  padding-top: 11px;
  padding-bottom: 4px;
}

.footer-connect {
  align-items: flex-start;
  text-align: left;
}

/* Footer brand heading spacing */
.footer-brand strong {
  margin-bottom: 6px;
}

/* Header utility icons */
.search-icon {
  width: 15px;
  height: 15px;
}

.nav-icon {
  width: 16px;
  height: 16px;
}

/* Avoid a doubled border on the last nav utility. */
.main-nav > :last-child {
  border-right: 0;
}

/* Archive pages */
.archive-page {
  width: min(1050px, calc(100% - 48px));

  margin: 0 auto;

  padding:
    54px
    0
    80px;
}

.archive-header {
  margin-bottom: 32px;

  padding-bottom: 24px;

  border-bottom:
    1px solid
    var(--line);
}


.archive-header h1 {
  margin:
    0
    0
    12px;

  font-family: var(--text);

  font-size:
    clamp(
      2.5rem,
      5vw,
      4.5rem
    );

  line-height: 1;
}

.archive-header > p:last-child {
  margin: 0;

  max-width: 700px;

  font-family: var(--text);

  font-size: 1rem;

  line-height: 1.55;
}

.archive-list {
  border-top:
    1px solid
    var(--soft-line);
}

.archive-entry {
  display: grid;

  grid-template-columns:
    115px
    minmax(0, 1fr);

  gap: 24px;

  padding:
    24px
    0;

  border-bottom:
    1px solid
    var(--soft-line);
}

.archive-entry > time {
  color: var(--green);

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;
}

.archive-entry h2 {
  margin:
    0
    0
    8px;

  font-family: var(--text);

  font-size: 1.15rem;
}

.archive-entry p {
  margin:
    0
    0
    10px;

  max-width: 760px;

  font-size: 1rem;

  line-height: 1.5;
}

.archive-entry-meta {
  display: flex;

  gap: 18px;

  color: var(--green);

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;

  text-transform: uppercase;
}

.archive-empty {
  padding:
    30px
    0;

  font-family: var(--text);

  font-weight: 400;
}

.about-copy {
  max-width: 720px;

  font-size: 1rem;

  line-height: 1.7;
}

.about-copy p {
  margin:
    0
    0
    1.3em;
}

@media (max-width: 700px) {
  .archive-page {
    width: calc(100% - 32px);

    padding-top: 35px;
  }

  .archive-entry {
    grid-template-columns: 1fr;

    gap: 8px;
  }
}

/* Keep footer at bottom of short pages */
.site-footer {
  flex-shrink: 0;
}

/* Subscribe page */
.subscribe-feed {
  max-width: 720px;

  padding:
    22px
    0;
}

.subscribe-label {
  margin:
    0
    0
    9px;

  color: var(--green);

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;
}

.subscribe-feed code {
  display: block;

  padding:
    14px
    16px;

  overflow-x: auto;

  border:
    1px solid
    var(--line);

  background: #080808;
  color: #eeeeea;

  font-family: var(--code);

  white-space: nowrap;
}

.subscribe-feed-link {
  display: inline-block;

  margin-top: 12px;

  font-family: var(--text);

  font-size: 1rem;
  font-weight: 400;
}

/* Theme */
html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --paper: #252525;
  --outside: #151515;

  --ink: #f7f4ed;

  --line: #555555;
  --soft-line: #414141;

  --green: #7fa787;

  --tag-guides: #9ab49f;
  --tag-lab: #bea984;
  --tag-tutorials: #88aeb6;
  --tag-security: #bd8d89;
  --tag-case-studies: #a99bb8;
  --tag-events: #b8a56d;
  --tag-notes: #aaaaaa;
}


/* Theme control */
.theme-toggle {
  padding: 0;

  border:
    0;

  border-right:
    1px solid
    var(--line);

  color: var(--ink);
  background: transparent;

  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: color-mix(
    in srgb,
    var(--ink) 6%,
    transparent
  );
}

.theme-icon {
  width: 17px;
  height: 17px;
}


/* Local black SVG icons need inversion against dark UI. */
html[data-theme="dark"] .dharma-mark,
html[data-theme="dark"] .search-icon,
html[data-theme="dark"] .nav-icon,
html[data-theme="dark"] .theme-icon {
  filter: invert(1);
}


/*
 * Keep the illustrated hero on its original paper canvas.
 * The PNG was authored to blend into this exact background;
 * recoloring the surrounding canvas creates a visible rectangle.
 */
html[data-theme="dark"] .hero-art {
  background: #f4f0e7;
}


/* Preserve the footer pattern artwork on its authored canvas. */
html[data-theme="dark"] .footer-pattern {
  background-color: #f4f0e7;
}


/* Active navigation still needs light lettering. */
html[data-theme="dark"] .main-nav a.active {
  color: #f4f0e7;
}


/* Search-result hover state. */
html[data-theme="dark"] .search-results a:hover,
html[data-theme="dark"] .search-results a:focus-visible {
  background: #303030;
}


/* Keep form controls visually consistent with the site. */
html[data-theme="dark"] .header-search input,
html[data-theme="dark"] .header-search button {
  color: var(--ink);
}


/* Terminal media is already authored for a dark canvas. */
html[data-theme="dark"] .terminal-window,
html[data-theme="dark"] img.terminal-animation {
  background: #151515;
}

/* Code / terminal typography */
code,
pre,
kbd,
samp,
.highlight,
.highlighter-rouge {
  font-family: var(--code);
}

code,
kbd,
samp {
  font-size: 1em;
}

pre code {
  font-size: inherit;
}

/* Typography */

/*
 * Xanh Mono has fine strokes at very small sizes.
 * Keep the compact footer, but give the text enough size
 * and leading to remain readable.
 */
.site-footer .footer-brand,
.site-footer .footer-connect {
  font-size: 1rem;
  line-height: 1.32;
}

.site-footer .footer-about {
  font-size: 1rem;
  line-height: 1.30;
}

.site-footer .footer-about p,
.site-footer .footer-about a,
.site-footer .footer-about span {
  font-size: inherit;
  line-height: inherit;
}


/*
 * Markdown / Rouge code gets Share Tech Mono.
 *
 * These selectors are intentionally more specific than
 * the general Xanh Mono typography rules.
 */
article code,
article pre,
article kbd,
article samp,
code.highlighter-rouge,
.highlighter-rouge code,
.highlight code,
pre.highlight,
pre.highlight code {
  font-family: var(--code);
}

/* Accessibility */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;

  padding: 8px 12px;

  border: 1px solid var(--line);

  background: var(--paper);
  color: var(--ink);

  font-family: var(--text);

  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Canary v2: Xanh Mono screen readability */

/*
 * Xanh Mono is supplied as a 400-weight face.
 * Do not let browsers synthesize heavier or oblique faces,
 * since synthetic rendering varies significantly between displays.
 */
html {
  font-synthesis: none;
}

/* Canary v2: compact footer links */
.site-footer a {
  font-size: 0.875rem;
  font-weight: 400;
}

/* Canary v2: typography hierarchy */

/*
 * Xanh Mono only ships a genuine 400 weight.
 * Keep mono UI text at that real weight rather than allowing
 * synthetic bold rendering.
 */

/* Masthead uses the serif family, which has a genuine bold face. */
.site-title {
  font-weight: 700;
}


/* Navigation stays Xanh Mono 400 but receives stronger hierarchy
 * through size and tracking rather than synthetic weight.
 */
.main-nav a,
.main-nav button {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.025em;
}


/*
 * Xanh Mono does not contain Japanese glyphs, so this text uses
 * the platform's Japanese fallback font. Slightly larger sizing
 * compensates for the different visual metrics.
 */
.japanese-motto {
  font-size: 1.125rem;
  line-height: 1.45;
}


/* Entire footer deliberately uses the smaller 14px tier. */
.site-footer,
.site-footer p,
.site-footer a,
.site-footer span,
.site-footer strong {
  font-size: 0.875rem;
  line-height: 1.35;
}


/*
 * Footer section headings remain real Xanh Mono 400.
 * Tracking provides emphasis without synthesizing a bold face.
 */
.site-footer .footer-brand strong,
.site-footer .footer-connect strong {
  font-weight: 400;
  letter-spacing: 0.06em;
}


/* Footer body copy should remain compact and readable. */
.site-footer .footer-about,
.site-footer .footer-about p,
.site-footer .footer-about a,
.site-footer .footer-about span {
  font-size: 0.875rem;
  line-height: 1.35;
}

/* Canary v2: spacing and scale pass */

/*
 * Japanese glyphs come from the platform fallback font rather
 * than Xanh Mono, so give them additional visual size.
 */
.japanese-motto {
  font-size: 1.25rem;
  line-height: 1.4;
}


/*
 * Recent posts use a simple two-level hierarchy:
 * 16px title, 14px supporting summary.
 */
.recent-copy h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.recent-copy p {
  font-size: 0.875rem;
  line-height: 1.4;
}


/*
 * The footer is taller after moving its typography to 14px.
 * Increase the pattern tiles so they remain proportional.
 */
.footer-pattern {
  height: 64px;
}

/* Memorial line in footer */
.footer-rip {
  color: #8b3f3f;
  opacity: 0.72;
}

html[data-theme="dark"] .footer-rip {
  color: #c87575;
  opacity: 0.72;
}

