/* =========================================================
   blog.apario.net — shared stylesheet
   ========================================================= */

/* -- FONTS --------------------------------------------- */
@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/Bitter-Light.woff2") format("woff2");
}
@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Bitter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Bitter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-Light.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/Inter-Light.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Inter-Bold.woff2") format("woff2");
}

/* -- VARIABLES ----------------------------------------- */
:root {
  --deep:      #07111f;
  --sky:       #5a9fd4;
  --ice:       #a8cfec;
  --white:     #eef4fb;
  --dim:       rgba(238,244,251,0.62);
  --line:      rgba(168,207,236,0.18);
  --nav-h:     62px;
  --footer-h:  32px;
  --list-w:    256px;
  --nav-border-offset: 14px;

  --bg:        #f9fafa;
  --bg-left:   #F1F1EF;
  --text:      #18181a;
  --text-left: #0e0e0f;
  --text-dim:  #3a3830;
  --text-faint:#6a6660;
  --accent:    #2a5f8f;
  --accent-dim:rgba(42,95,143,0.15);
  --rule:      rgba(26,26,24,0.1);
  --code-bg:   rgba(26,26,24,0.06);
  --pre-bg:    #F1F1EF;
  --pre-border:#2a5f8f;
}

/* -- RESET --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: "Bitter", serif;
  color: var(--white);
  background: var(--bg);
  min-height: 100vh;
}

/* -- NAV ----------------------------------------------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: flex-end;
  padding: 0 2.4rem var(--nav-border-offset);
  border-bottom: 1px solid var(--line);
  background: #07111f;
  overflow-x: auto;
  scrollbar-width: none;
}
#nav-logo {
  font-family: "Times New Roman", Times, serif;
  font-size: 2.2rem; font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--white);
  text-decoration: none;
  opacity: 0.9;
  position: absolute;
  left: 12px;
  bottom: calc(var(--nav-border-offset) - 7px);
  white-space: nowrap;
}
#nav-logo em { font-style: italic; color: var(--ice); }
#nav-logo:hover { opacity: 1; }
.nav-tagline {
  font-size: 2.2rem; font-weight: 300;
  color: rgba(238,244,251,0.4);
  letter-spacing: 0.04em;
}

/* -- LEFT COLUMN --------------------------------------- */
.left-col {
  position: fixed;
  top: var(--nav-h);
  bottom: var(--footer-h);
  left: 0;
  width: var(--list-w);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 0 12px;
  padding-top: 1rem;
  z-index: 10;
  background: var(--bg-left);
  border-right: 1px solid var(--rule);
  transition: transform 0.25s ease;
}
.left-col::-webkit-scrollbar { display: none; }

.list-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.5rem;
}
.list-label.author { margin-bottom: -8px; }
.list-label.articles {
  margin-top: 0.4rem;
  margin-bottom: 0;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--rule);
}

/* -- AUTHOR BLOCK -------------------------------------- */
.author-block {
  margin: 1rem 0 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}
.author-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.author-img {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.6rem;
  filter: grayscale(20%);
  flex-shrink: 0;
}
.author-name {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-left); line-height: 1.2;
  display: block;
}
.author-title {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem; font-weight: 400;
  color: var(--accent);
  display: block;
  line-height: 1.4;
}
.author-bio {
  font-size: 0.82rem; font-weight: 300;
  color: var(--text-left); line-height: 1.5;
  font-family: "Bitter", serif;
  margin-bottom: 0.3rem;
}

/* -- ARTICLE LIST -------------------------------------- */
.list-item {
  position: relative;
  display: block;
  text-decoration: none;
  padding: 0.35rem 8px 0.35rem 6px;
  margin: 0 -8px 0 -8px;
  border-left: 2px solid transparent;
  transition: background 0.12s;
}
.list-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 1px;
  background-color: var(--rule);
}
.list-item.active {
  border-left-color: var(--accent);
  background: linear-gradient(
    to right,
    rgba(42, 95, 143, 0.15) 0%,
    rgba(42, 95, 143, 0) 50%
  );
}
.list-item:hover {
  border-left-color: rgba(42,95,143,0.3);
  background: rgba(42,95,143,0.05);
}
.list-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem; font-weight: 400;
  color: var(--text-left); line-height: 1.35;
  margin-bottom: 0.1rem;
}
.list-item.active .list-title { color: var(--text); }
.list-item:hover .list-title { color: var(--text); }
.list-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem; font-weight: 300;
  color: var(--text);
  line-height: 1; margin: 0 0 0.2rem;
}

/* -- DIVIDER ------------------------------------------- */
.divider { display: none; }

/* -- MAIN CONTENT AREA --------------------------------- */
.article-content,
.page-content {
  position: fixed;
  top: var(--nav-h);
  bottom: var(--footer-h);
  left: var(--list-w);
  right: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
  z-index: 1;
}
.article-content { padding: 1rem 4rem 2rem 1.4rem; }
.page-content    { padding: 1.6rem 4rem 2rem 1.4rem; }

/* -- ARTICLE ELEMENT ----------------------------------- */
.article-meta {
  font-family: "Inter", sans-serif;
  font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 0.5rem;
  display: block;
}
.article-meta-label {
  text-transform: uppercase;
  margin-right: 0.35em;
}
h1 {
  font-family: "Inter", sans-serif;
  font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2; color: var(--text);
  margin-bottom: 1.1rem;
  max-width: 640px;
  border: none;
}
h1 a, h1 a:hover { border: none; text-decoration: none; color: inherit; }
.article-rule { display: none; }
p {
  font-size: 0.97rem; line-height: 1.4;
  color: var(--text); font-weight: 400;
  margin-bottom: 1.1rem;
  max-width: 640px;
}
h2 {
  font-family: "Inter", sans-serif;
  font-weight: 600; font-size: 1.2rem;
  line-height: 1.2; color: var(--text);
  margin: 1.25rem 0 0.7rem;
  letter-spacing: 0;
}
h3 {
  font-family: "Inter", sans-serif;
  font-weight: 600; font-size: 0.88rem;
  color: var(--text-dim);
  margin: 1.6rem 0 0.5rem;
  letter-spacing: 0;
}
ul, ol {
  font-family: "Bitter", serif;
  font-size: 0.97rem; line-height: 1.4;
  color: var(--text); font-weight: 400;
  max-width: 620px;
  margin-bottom: 1.1rem;
  padding-left: 1.4rem;
}
li { margin-bottom: 0.4rem; }
li strong { font-weight: 600; color: var(--text); }
hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
  max-width: 640px;
}
pre {
  position: relative;
  background: var(--pre-bg);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--pre-border);
  border-radius: 2px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin-bottom: 1.2rem;
  max-width: 640px;
}
pre code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem; line-height: 1.75;
  color: var(--text);
  background: none;
  padding: 0;
}
code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82em;
  color: var(--text);
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}
table {
  width: 100%; max-width: 800px;
  border-collapse: collapse;
  margin-bottom: 1.4rem;
  font-size: 0.82rem;
  font-family: "Inter", sans-serif;
  font-weight: 300;
}
th {
  text-align: left;
  font-weight: 400; font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding: 0.4rem 0.8rem 0.4rem 0;
}
td {
  padding: 0.5rem 0.8rem 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  vertical-align: top;
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; border-bottom: 0; }
a:hover { border-bottom-color: rgba(42,95,143,0.6); }
blockquote {
  border-left: 2px solid var(--accent);
  margin: 1.2rem 0;
  padding: 0.4rem 0 0.4rem 1rem;
  max-width: 640px;
  color: var(--text-dim);
  font-style: italic;
}

/* -- ARTICLE FOOTER ------------------------------------ */
.article-footer {
  display: block;
  position: relative;
  max-width: 640px;
  margin-top: 0;
}
article {
  max-width: 640px;
  padding-top: 0.1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
  margin-bottom: 0.1rem;
}

/* prev/next nav */
.article-nav {
  display: grid;
  position: relative;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.6rem;
}
.article-nav-prev,
.article-nav-next {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
}
.article-nav-next { text-align: right; }
.article-nav-direction {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.article-nav-title {
  font-family: "Bitter", serif;
  font-size: 0.84rem; font-weight: 400;
  color: var(--text-dim);
  line-height: 1.35;
}
.article-nav-prev:hover .article-nav-title,
.article-nav-next:hover .article-nav-title { color: var(--text); }

/* article-section */
.article-section {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.article-section .list-label { margin-bottom: 0.35rem; }
.article-section ul {
  list-style: none;
  padding: 0.2rem 0 0 0;
  margin: 0;
}
.article-section ul li { margin-bottom: 0.05rem; }
.article-section ul li a {
  font-family: "Bitter", serif;
  font-size: 0.97rem; font-weight: 400;
  line-height: 1.4;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.article-section ul li a:hover {
  color: var(--accent);
  border-bottom-color: rgba(42,95,143,0.35);
}
.article-section p { padding: 0.6rem 0 0 0; margin-bottom: 0; }
.article-section .author-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* -- MOBILE MENU BUTTON -------------------------------- */
#menu-tab { display: none; }

/* -- RESPONSIVE ---------------------------------------- */
@media (max-width: 700px) {
  .left-col {
    transform: translateX(-100%);
    display: block;
  }
  .left-col .author-block,
  .left-col .list-label.author { display: none; }
  .article-content,
  .page-content { left: 0; padding: 1.2rem 1.2rem 1.2rem 12px; }
  .article-nav { flex-direction: column; gap: 1rem; }
  .article-nav-next { text-align: left; margin-left: 0; }

  #menu-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 10px;
    top: calc(var(--nav-h) - 9px);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-left);
    border: 1px solid rgba(26,26,24,0.25);
    cursor: pointer;
    z-index: 200;
    user-select: none;
    transition: background 0.15s;
  }
  #menu-tab:hover { background: var(--white); }
  #menu-tab .tab-close { display: none; }
  #menu-toggle:checked ~ #menu-tab .tab-open { display: none; }
  #menu-toggle:checked ~ #menu-tab .tab-close { display: flex; }
  #menu-toggle:checked ~ aside.left-col { transform: translateX(0); }
}

/* -- PRINT --------------------------------------------- */
.print-header, .print-footer { display: none; }

@media print {
  aside.left-col, .divider, #menu-toggle, #menu-tab, nav, #footer { display: none !important; }
  .article-nav,
  .article-section:not(.article-section--printable) { display: none !important; }
  .print-header, .print-footer {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    color: #000;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
  }
  .print-header {
    border-bottom: 1px solid #000;
    margin-bottom: 1.5rem;
  }
  .print-footer { font-size: 0.65rem; color: #444; }
  .print-logo {
    font-family: "Bitter", serif;
    font-size: 2rem; font-weight: 400;
    letter-spacing: 0.04em;
  }
  .print-tagline { font-style: italic; color: #444; }
  html, body { height: auto; overflow: visible; }
  .article-content {
    position: static;
    left: 0; top: 0; bottom: auto; right: 0;
    overflow: visible;
    padding: 0;
  }
  article, .article-footer { max-width: 100%; }
}

/* -- FOOTER -------------------------------------------- */
#footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--footer-h); z-index: 100;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 300;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--line);
  background: #07111f;
  color: rgba(168,207,236,0.75);
}
.footer-inner {
  display: flex;
  width: 100%;
  max-width: 320px;
}
.footer-inner > * {
  flex: 1;
  text-align: center;
}
#footer a, #footer a:visited {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

/* -- COPY BUTTON --------------------------------------- */
.copy-btn {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  background: none; border: none;
  cursor: pointer; padding: 0.2rem;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  line-height: 1;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--accent); }
.copy-btn.copied { color: var(--accent); opacity: 1; }
.copy-btn svg { display: block; width: 14px; height: 14px; }

