/* ================================================
   ThinkingTokens — Dark Hacker × Futurist
   Green palette pulled from logo
   ================================================ */

/* ── Variables ── */
:root {
  /* Backgrounds */
  --bg-base:      #08090c;
  --bg-surface:   #0e1015;
  --bg-raised:    #131820;
  --bg-nav:       #060708;
  --bg-code:      #0b0e14;
  --bg-code-bar:  #080a0f;

  /* Text */
  --txt-hi:   #dfe3ea;
  --txt-mid:  #8b9099;
  --txt-lo:   #545964;

  /* Accent – green from logo */
  --green:       #4ade80;
  --green-dim:   rgba(74, 222, 128, .12);
  --green-glow:  rgba(74, 222, 128, .35);
  --green-neon:  #39ff14;

  /* Secondary */
  --purple:      #a78bfa;
  --purple-dim:  rgba(167, 139, 250, .12);
  --cyan:        #67e8f9;
  --cyan-dim:    rgba(103, 232, 249, .10);

  /* Borders */
  --border:      #1c2030;
  --border-hi:   #2a3042;

  /* Fonts */
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --nav-h:    96px;
  --sidebar:  272px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg-base);
  color: var(--txt-hi);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* subtle CRT scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,  transparent 2px,
    rgba(0,0,0,.018) 2px, rgba(0,0,0,.018) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

a { color: var(--green); text-decoration: none; transition: color .2s, text-shadow .2s; }
a:hover { color: #6aedaa; text-shadow: 0 0 12px var(--green-glow); }

ul, ol { list-style: none; }
img { max-width: 100%; height: auto; }
::selection { background: var(--green-dim); color: var(--green); }

/* scrollbar */
::-webkit-scrollbar            { width: 5px; }
::-webkit-scrollbar-track      { background: var(--bg-base); }
::-webkit-scrollbar-thumb      { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }

/* ================================================
   TOP NAV   –  always dark
   ================================================ */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  max-width: 1410px;
  margin: 0;
  padding: 0 24px;
}

/* Logo */
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-img { height: 62px; width: auto; border-radius: 4px; object-fit: contain; }
.nav-logo-text {
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 500;
  color: var(--txt-hi);
  letter-spacing: -.01em;
}
.nav-logo:hover            { text-shadow: none; }
.nav-logo:hover .nav-logo-text { color: var(--green); }

/* Nav links */
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-family: var(--mono);
  font-size: .92rem;
  color: var(--txt-mid);
  padding: 6px 16px;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: all .2s;
}
.nav-link:hover         { color: var(--green); background: var(--green-dim); border-color: rgba(74,222,128,.2); text-shadow: none; }
.nav-link.active        { color: var(--green); background: var(--green-dim); border-color: rgba(74,222,128,.25); }

/* Hamburger (shown on mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.toggle-line { width: 21px; height: 2px; background: var(--txt-mid); border-radius: 1px; transition: .3s; }

/* ================================================
   LAYOUT SHELL
   ================================================ */
.layout-wrap { display: flex; min-height: 100vh; padding-top: var(--nav-h); }

/* ── Full-width layout (no sidebar) ── */
.fw-wrap {
  padding-top: var(--nav-h);
  min-height: 100vh;
}
.fw-article {
  max-width: 1600px;
  margin: 0 auto;
  padding: 48px 60px;
}
.fw-head  { margin-bottom: 0; }
.fw-nav   { margin-top: 48px; }

/* ================================================
   SIDEBAR
   ================================================ */
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  height: calc(100vh - var(--nav-h));
  position: sticky;
  top: var(--nav-h);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-inner  { padding: 28px 20px 40px; }
.sidebar-close  { display: none; } /* desktop: hidden */
.sidebar-section { margin-bottom: 4px; }

/* heading */
.sidebar-heading {
  font-family: var(--mono);
  font-size: .84rem;
  font-weight: 500;
  color: var(--txt-lo);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.sh-prompt { color: var(--green); font-size: .92rem; }
.sh-count  {
  margin-left: auto;
  font-size: .76rem;
  background: var(--bg-raised);
  color: var(--txt-lo);
  padding: 2px 8px;
  border-radius: 10px;
}

/* divider */
.sidebar-rule { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Tag search ── */
.tag-search-wrap { position: relative; margin-bottom: 12px; }
.tag-search {
  width: 100%;
  padding: 8px 30px 8px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--txt-hi);
  font-family: var(--mono);
  font-size: .86rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.tag-search::placeholder { color: var(--txt-lo); }
.tag-search:focus { border-color: rgba(74,222,128,.4); box-shadow: 0 0 0 3px var(--green-dim); }
.tag-search-icon {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--txt-lo);
  font-size: .82rem;
  pointer-events: none;
}

/* ── Tag cloud ── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.tag-chip {
  font-family: var(--mono);
  font-size: .80rem;
  color: var(--txt-mid);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all .15s;
}
.tag-chip:hover  { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.tag-chip.active { border-color: var(--green); color: var(--green); background: var(--green-dim); box-shadow: 0 0 8px var(--green-dim); }

/* ── Archive selects ── */
.archive-selects { display: flex; flex-direction: column; gap: 8px; }
.archive-sel {
  width: 100%;
  padding: 8px 28px 8px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--txt-hi);
  font-family: var(--mono);
  font-size: .86rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23545964'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.archive-sel:focus  { border-color: rgba(74,222,128,.4); box-shadow: 0 0 0 3px var(--green-dim); }
.archive-sel option { background: var(--bg-raised); color: var(--txt-hi); }

/* ── Sidebar post list ── */
.sidebar-posts { display: flex; flex-direction: column; gap: 1px; }

.sidebar-post a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s;
}
.sidebar-post a:hover  { background: var(--bg-raised); text-shadow: none; }
.sidebar-post a.active { background: var(--green-dim); }

.sp-date {
  display: block;
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--txt-lo);
  margin-bottom: 2px;
}
.sp-title {
  display: block;
  font-size: .92rem;
  color: var(--txt-hi);
  font-weight: 500;
  line-height: 1.4;
  transition: color .15s;
}
.sidebar-post a:hover .sp-title { color: var(--green); }

.sp-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.sp-tag  {
  font-family: var(--mono);
  font-size: .70rem;
  color: var(--txt-lo);
  background: var(--bg-base);
  padding: 1px 6px;
  border-radius: 3px;
}

/* empty / no-results */
.sidebar-posts .no-results {
  color: var(--txt-lo);
  font-family: var(--mono);
  font-size: .76rem;
  padding: 20px 12px;
  text-align: center;
}

/* ── Clear filters ── */
.clear-filters {
  display: none;
  width: 100%;
  margin-top: 18px;
  padding: 7px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--txt-mid);
  font-family: var(--mono);
  font-size: .72rem;
  cursor: pointer;
  transition: all .2s;
}
.clear-filters:hover { border-color: #f87171; color: #f87171; background: rgba(248,113,113,.07); }
.clear-filters.show  { display: block; }

/* ================================================
   MAIN CONTENT
   ================================================ */
.main       { flex: 1; min-width: 0; }
.main-inner { max-width: 780px; padding: 48px 44px; }

/* ================================================
   HOME – hero
   ================================================ */
.hero        { padding: 4px 0 68px; }
.hero-prompt {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--green-neon);
  margin-bottom: 18px;
  opacity: .85;
}
.hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}
.hero-logo {
  width: 320px;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}
.hero-title {
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.ht-line   { display: block; color: var(--txt-hi); }
.ht-accent { display: block; color: var(--green); text-shadow: 0 0 40px var(--green-dim); }

.hero-sub {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--green);
  opacity: .75;
  letter-spacing: .06em;
  margin-bottom: 18px;
}
.hero-desc {
  font-size: 1.02rem;
  color: var(--txt-mid);
  max-width: 540px;
  margin-bottom: 30px;
  line-height: 1.8;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: .80rem;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.btn-primary { background: var(--green); color: #08090c; }
.btn-primary:hover { background: #6aedaa; box-shadow: 0 0 18px var(--green-glow); text-shadow: none; color: #08090c; }
.btn-outline { background: transparent; color: var(--txt-hi); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--green); color: var(--green); background: var(--green-dim); text-shadow: none; }

/* Section heading (reusable) */
.section-head {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--txt-hi);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
}

/* ================================================
   POST CARDS  –  home grid + category pages
   ================================================ */
.post-grid  { display: flex; flex-direction: column; gap: 16px; }

.post-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 24px;
  transition: border-color .25s, transform .2s, box-shadow .25s;
  position: relative;
}
.post-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.35), 0 0 14px var(--green-dim);
}

.post-card-top  { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-card-cat  {
  font-family: var(--mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--purple-dim);
  color: var(--purple);
}
.post-card-cat:hover   { text-shadow: none; color: var(--purple); }
.post-card-date        { font-family: var(--mono); font-size: .70rem; color: var(--txt-lo); }
.post-card-title       { font-size: 1.18rem; font-weight: 600; margin-bottom: 8px; line-height: 1.35; }
.post-card-title a     { color: var(--txt-hi); transition: color .2s; }
.post-card-title a::after { content: ''; position: absolute; inset: 0; border-radius: 10px; }
.post-card-title a:hover { color: var(--green); text-shadow: none; }
.post-card-excerpt     { font-size: .88rem; color: var(--txt-mid); margin-bottom: 12px; line-height: 1.7; }
.post-card-tags        { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.post-card-tag         { font-family: var(--mono); font-size: .66rem; color: var(--green); background: var(--green-dim); padding: 2px 8px; border-radius: 4px; position: relative; z-index: 1; }
.post-card-cta         { font-family: var(--mono); font-size: .76rem; color: var(--green); transition: color .2s; position: relative; z-index: 1; }
.post-card-cta:hover   { color: #6aedaa; text-shadow: none; }
.post-card-cat         { position: relative; z-index: 1; }

/* ================================================
   POST PAGE
   ================================================ */
.post { max-width: 720px; }

/* header */
.post-head    { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.post-meta    { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.post-cat     {
  font-family: var(--mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--purple-dim);
  color: var(--purple);
}
.post-cat:hover  { text-shadow: none; color: var(--purple); }
.post-date       { font-family: var(--mono); font-size: .74rem; color: var(--txt-lo); }
.post-title      { font-size: 2.1rem; font-weight: 600; color: var(--txt-hi); line-height: 1.25; letter-spacing: -.02em; margin-bottom: 14px; }
.post-tags       { display: flex; flex-wrap: wrap; gap: 6px; }
.post-tag        { font-family: var(--mono); font-size: .70rem; color: var(--green); background: var(--green-dim); padding: 3px 10px; border-radius: 4px; }

/* ── body typography ── */
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 { color: var(--txt-hi); margin-top: 2rem; margin-bottom: .7rem; line-height: 1.3; }

.post-body h2      { font-size: 1.4rem;  font-weight: 600; padding-bottom: .45rem; border-bottom: 1px solid var(--border); }
.post-body h3      { font-size: 1.1rem;  font-weight: 600; }
.post-body h4      { font-size: .95rem;  font-weight: 600; }
.post-body p       { color: var(--txt-mid); font-size: .94rem; margin-bottom: 1.2rem; }
.post-body ul,
.post-body ol      { padding-left: 22px; margin-bottom: 1.2rem; }
.post-body ul      { list-style: disc; }
.post-body ol      { list-style: decimal; }
.post-body li      { color: var(--txt-mid); font-size: .94rem; margin-bottom: .45rem; }
.post-body hr      { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* tables */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: .86rem;
}
.post-body thead tr {
  background: var(--bg-raised);
  border-bottom: 2px solid var(--green);
}
.post-body th {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--green);
  text-align: left;
  padding: 10px 16px;
  white-space: nowrap;
}
.post-body td {
  color: var(--txt-mid);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.post-body tbody tr:last-child td { border-bottom: none; }
.post-body tbody tr:hover td      { background: var(--bg-raised); }

.post-body blockquote {
  border-left: 3px solid var(--green);
  background: var(--green-dim);
  border-radius: 0 6px 6px 0;
  padding: 14px 20px;
  margin: 1.4rem 0;
}
.post-body blockquote p { color: var(--txt-hi); font-style: italic; margin-bottom: 0; }

.post-body a        { border-bottom: 1px solid rgba(74,222,128,.35); }
.post-body a:hover  { border-color: var(--green); }

/* inline code */
.post-body code:not(pre code) {
  font-family: var(--mono);
  font-size: .82rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--green);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ================================================
   CODE BLOCKS  –  Rouge syntax highlighting
   ================================================ */
div.highlight {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 1.4rem 0;
  overflow: hidden;
}

/* traffic-light title bar */
div.highlight::before {
  content: '';
  display: block;
  height: 34px;
  background-color: var(--bg-code-bar);
  border-bottom: 1px solid var(--border);
  background-image:
    radial-gradient(circle at 18px 17px, #ff5f57  5px, transparent 5px),
    radial-gradient(circle at 34px 17px, #ffbd2e  5px, transparent 5px),
    radial-gradient(circle at 50px 17px, #28c840  5px, transparent 5px);
  background-repeat: no-repeat;
}

div.highlight pre  { padding: 16px 20px; overflow-x: auto; margin: 0; }
div.highlight code {
  font-family: var(--mono);
  font-size: .81rem;
  color: #cdd6f4;
  line-height: 1.7;
  white-space: pre;
}

/* ── Catppuccin-Mocha token colours ── */
.highlight .k,  .highlight .kd, .highlight .kn,
.highlight .kr, .highlight .kp, .highlight .ow  { color: #cba6f7; }           /* keyword   */
.highlight .kt                                   { color: #f9e2af; }           /* type      */

.highlight .s,  .highlight .s1, .highlight .s2,
.highlight .sa, .highlight .sb, .highlight .sc,
.highlight .sd, .highlight .se, .highlight .sh,
.highlight .si, .highlight .sx, .highlight .ss,
.highlight .sn                                   { color: #a6e3a1; }           /* string    */

.highlight .nb, .highlight .nf,
.highlight .bp, .highlight .na                   { color: #89b4fa; }           /* builtin/fn*/
.highlight .nd, .highlight .nc                   { color: #f9e2af; }           /* decorator */
.highlight .nn, .highlight .n,
.highlight .nv, .highlight .nx                   { color: #cdd6f4; }           /* name      */
.highlight .ni                                   { color: #89dceb; }           /* entity    */
.highlight .nt                                   { color: #f38ba8; }           /* tag       */

.highlight .c,  .highlight .c1, .highlight .cm,
.highlight .cp, .highlight .cpf, .highlight .cs  { color: #585b70; font-style: italic; } /* comment */

.highlight .mi, .highlight .mf, .highlight .mh,
.highlight .mo, .highlight .m,  .highlight .mw   { color: #fab387; }           /* number    */

.highlight .o,  .highlight .ob                   { color: #89dceb; }           /* operator  */
.highlight .p,  .highlight .pi                   { color: #cdd6f4; }           /* punctuation*/
.highlight .err                                  { color: #f38ba8; background: rgba(243,139,168,.15); }

/* generic (diffs, output, prompts) */
.highlight .gp { color: #cba6f7; }
.highlight .gi { color: #a6e3a1; }
.highlight .gd { color: #f38ba8; }
.highlight .ge { font-style: italic; }
.highlight .gs { font-weight: bold; }
.highlight .go { color: #cdd6f4; }

/* line numbers (if rouge table mode) */
.highlight .linenos,
.highlight .linenodiv pre { color: var(--txt-lo); font-size: .76rem; user-select: none; }

/* ================================================
   GIST / CODE EMBED  –  drop a <script> tag
   ================================================ */
.gist-embed, .code-embed {
  margin: 1.4rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ================================================
   PAGE  –  static pages (About uses its own)
   ================================================ */
.page       { max-width: 720px; }
.page-title {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--txt-hi);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ================================================
   ABOUT
   ================================================ */
.about { max-width: 720px; }
.about-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 42px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.about-avatar {
  width: 180px; height: 180px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green);
  box-shadow: 0 0 12px var(--green-dim);
}
.about-name { font-family: var(--mono); font-size: 1.9rem; font-weight: 600; color: var(--txt-hi); margin-bottom: 6px; }
.about-role { font-family: var(--mono); font-size: .96rem; color: var(--green); opacity: .8; }

.about-section    { margin-bottom: 30px; }
.about-section h3 {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--txt-hi);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}
.about-section p  { font-size: .93rem; color: var(--txt-mid); margin-bottom: .9rem; }

/* social links */
.social-links { display: flex; gap: 12px; margin-top: 14px; }
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--txt-mid);
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green-dim);
  opacity: 0;
  transition: opacity .25s ease;
  border-radius: inherit;
}
.social-link:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 20px var(--green-dim), 0 4px 12px rgba(0,0,0,.3);
  transform: translateY(-2px);
  text-shadow: none;
}
.social-link:hover::before { opacity: 1; }
.social-link svg { width: 18px; height: 18px; position: relative; z-index: 1; }

/* skills grid */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.skill       { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; transition: border-color .2s; }
.skill:hover { border-color: var(--green); }
.skill-name  { font-family: var(--mono); font-size: .82rem; color: var(--txt-hi); font-weight: 500; display: block; }
.skill-sub   { font-family: var(--mono); font-size: .67rem; color: var(--txt-lo); display: block; margin-top: 3px; }

/* ================================================
   CATEGORY PAGE
   ================================================ */
.catpage      { max-width: 720px; }
.catpage-head { margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.catpage-prompt { font-family: var(--mono); font-size: 1rem; color: var(--green-neon); opacity: .85; margin-bottom: 18px; display: block; }
.catpage-title  { font-family: var(--mono); font-size: 1.9rem; font-weight: 600; color: var(--txt-hi); margin-bottom: 6px; }
.catpage-desc   { font-size: .9rem; color: var(--txt-mid); }
.catpage-list   { display: flex; flex-direction: column; gap: 16px; }
.catpage-empty  { color: var(--txt-lo); font-family: var(--mono); font-size: .82rem; padding: 40px 0; text-align: center; }
.main-filter-empty { color: var(--txt-lo); font-family: var(--mono); font-size: .82rem; padding: 40px 0; text-align: center; grid-column: 1 / -1; }

/* ================================================
   POST NAV  –  prev / next
   ================================================ */
.post-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); }
.post-nav-link {
  display: flex; flex-direction: column;
  max-width: 48%;
  padding: 14px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color .2s;
}
.post-nav-link:hover      { border-color: var(--green); text-shadow: none; }
.post-nav-link.next       { margin-left: auto; text-align: right; }
.pnav-label               { font-family: var(--mono); font-size: .66rem; color: var(--green); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; display: block; }
.pnav-title               { font-size: .86rem; color: var(--txt-hi); font-weight: 500; line-height: 1.4; }

/* ================================================
   RESPONSIVE
   ================================================ */

/* ── tablet / small desktop ── */
@media (max-width: 900px) {
  /* sidebar slides off-canvas */
  .sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar));
    width: var(--sidebar);
    height: 100vh;
    z-index: 999;
    transition: left .3s cubic-bezier(.4,0,.2,1);
    padding-top: var(--nav-h);
  }
  .sidebar.open { left: 0; }

  /* overlay behind sidebar */
  .sidebar-overlay             { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 998; }
  .sidebar-overlay.show        { display: block; }

  /* close button visible */
  .sidebar-close {
    display: flex;
    justify-content: flex-end;
    padding: 10px 18px 4px;
    background: none; border: none;
    color: var(--txt-mid);
    font-size: 1.1rem;
    cursor: pointer;
  }
  .sidebar-close:hover { color: var(--txt-hi); }

  /* hamburger visible */
  .nav-toggle { display: flex; }

  .main-inner { padding: 40px 28px; }
  .hero-title { font-size: 2.4rem; }
  .hero-logo  { width: 240px; }
}

/* ── mobile ── */
@media (max-width: 580px) {
  .nav-logo-text { display: none; }
  .nav-links     { gap: 2px; }
  .nav-link      { padding: 5px 9px; font-size: .73rem; }

  .main-inner    { padding: 30px 18px; }
  .hero-title    { font-size: 1.9rem; }
  .hero-desc     { font-size: .94rem; }
  .hero-logo     { width: 180px; }
  .nav-logo-img  { height: 44px; }
  .post-title    { font-size: 1.7rem; }

  .about-hero { flex-direction: column; align-items: flex-start; gap: 14px; }

  .post-nav            { flex-direction: column; }
  .post-nav-link       { max-width: 100%; }
  .post-nav-link.next  { margin-left: 0; text-align: left; }

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

/* ================================================
   PAGINATION
   ================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.pag-btn {
  font-family: var(--mono);
  font-size: .80rem;
  color: var(--txt-mid);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.pag-btn:hover:not(:disabled) {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-dim);
}
.pag-btn:disabled { opacity: .35; cursor: not-allowed; }
.pag-info {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--txt-lo);
  min-width: 48px;
  text-align: center;
}

/* ================================================
   SUBSCRIBE
   ================================================ */

/* ── Subscribe button ── */
.btn-subscribe {
  font-family: var(--mono);
  font-size: .88rem;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green);
  padding: 10px 22px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
  letter-spacing: .02em;
}
.btn-subscribe:hover {
  background: var(--green-dim);
  box-shadow: 0 0 14px var(--green-dim);
}

/* ── Subscribe modal ── */
.sub-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.sub-overlay.show { display: flex; }

.sub-modal {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-hi);
  border-top: 3px solid var(--green);
  border-radius: 12px;
  padding: 36px 40px 32px;
  max-width: 440px;
  width: calc(100% - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 40px var(--green-dim);
}

.sub-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--txt-lo);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color .15s;
}
.sub-close:hover { color: var(--txt-hi); }

.sub-prompt {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--green);
  opacity: .7;
  margin-bottom: 6px;
}
.sub-title {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--txt-hi);
  margin-bottom: 10px;
}
.sub-desc {
  font-size: .86rem;
  color: var(--txt-mid);
  line-height: 1.6;
  margin-bottom: 22px;
}

.sub-field {
  display: flex;
  gap: 8px;
}
.sub-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--txt-hi);
  font-family: var(--mono);
  font-size: .88rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.sub-input::placeholder { color: var(--txt-lo); }
.sub-input:focus {
  border-color: rgba(74,222,128,.4);
  box-shadow: 0 0 0 3px var(--green-dim);
}

.sub-submit {
  padding: 10px 18px;
  background: var(--green);
  color: #0a0e0f;
  border: none;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .2s, box-shadow .2s;
}
.sub-submit:hover   { opacity: .85; box-shadow: 0 0 14px var(--green-dim); }
.sub-submit:disabled { opacity: .5; cursor: not-allowed; }

.sub-feedback { font-family: var(--mono); font-size: .80rem; margin-top: 10px; min-height: 1.2em; }
.sub-feedback--success { color: var(--green); }
.sub-feedback--error   { color: #f87171; }
.sub-feedback--info    { color: var(--txt-mid); }

@media (max-width: 480px) {
  .sub-modal { padding: 28px 20px 24px; }
  .sub-field  { flex-direction: column; }
  .sub-submit { width: 100%; }
}
