/* ==========================================================================
   PRO DARK — Onyx
   Premium minimal dark theme for adair.tech
   ========================================================================== */

:root {
  --bg-base: #0c0c0f;
  --bg-surface: #131318;
  --bg-elevated: #1a1a22;
  --bg-hover: #212130;

  --accent-gold: #c8892a;
  --accent-blue: #4e8ef7;
  --accent-green: #44b07e;
  --accent-amber: #e8a020;

  --text-bright: #ededf5;
  --text-primary: #c0bdd4;
  --text-secondary: #6e6b88;
  --text-muted: #3c3952;

  --border-faint: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-normal: rgba(255, 255, 255, 0.15);

  --danger: #e05454;
  --warning: #e8a020;

  --grid-width: min(100ch, 94%);
  --font-display: 'Orbitron', 'Audiowide', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'Rajdhani', 'Exo 2', sans-serif;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.6), 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6), 0 8px 40px rgba(0, 0, 0, 0.3);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: linear-gradient(160deg, #0f0f14 0%, #0c0c0f 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-x: hidden;
}

/* Suppress cyberpunk body effects */
body::before,
body::after {
  display: none;
}

.wrapper::before {
  display: none;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.wrapper {
  display: grid;
  grid-template-columns: 1fr var(--grid-width) 1fr;
  min-height: 100vh;
  padding-top: 2rem;
}

.wrapper > * {
  grid-column: 2;
}

.full-bleed {
  width: 100%;
  grid-column: 1 / 4;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-transform: none;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--text-bright);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-shadow: none;
  animation: none;
}

/* Suppress glitch effect */
header h1::before,
header h1::after {
  display: none;
}

h2 {
  font-size: 1.5rem;
  color: var(--accent-gold);
  margin-top: 2.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  text-shadow: none;
}

h3 {
  font-size: 1.2rem;
  color: var(--accent-blue);
  letter-spacing: 0.04em;
  text-shadow: none;
}

h4 {
  font-size: 1.05rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1.5rem;
  max-width: 70ch;
}

strong {
  color: var(--text-bright);
  font-weight: 600;
}

em {
  color: var(--accent-gold);
  font-style: italic;
}

/* ==========================================================================
   Links
   ========================================================================== */
a {
  color: var(--accent-gold);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
  font-weight: 500;
}

a::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width 0.2s ease;
}

a:hover {
  color: var(--text-bright);
}

a:hover::after {
  width: 100%;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  position: relative;
}

/* Suppress terminal cursor */
header::before {
  display: none;
}

nav {
  margin-top: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: visible;
}

/* Suppress animated nav glows */
nav::before,
nav::after {
  display: none;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

nav ul li a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  background: transparent;
  clip-path: none;
  border-radius: 3px;
  transition: all 0.18s ease;
  display: inline-block;
}

nav ul li a::after {
  display: none;
}

nav ul li a:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
  border-color: var(--border-normal);
}

/* ==========================================================================
   Theme Switcher
   ========================================================================== */
.theme-switcher {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0.4rem 0 0;
}

.theme-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  user-select: none;
}

.theme-btn {
  width: 14px;
  height: 14px;
  padding: 0;
  cursor: pointer;
  border: none;
  border-radius: 3px;
  clip-path: none;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.theme-btn[data-theme="cyberpunk"] {
  background: #00e5ff;
}

.theme-btn[data-theme="pro-dark"] {
  background: #c8892a;
}

.theme-btn[data-theme="pro-light"] {
  background: #f0eee8;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.theme-btn:not(.active) {
  opacity: 0.45;
}

.theme-btn.active {
  opacity: 1;
}

.theme-btn:hover:not(.active) {
  opacity: 0.7;
}

/* ==========================================================================
   Main Content
   ========================================================================== */
main {
  background: linear-gradient(180deg, var(--bg-surface) 0%, #111118 100%);
  padding: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  clip-path: none;
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--accent-gold);
  box-shadow: var(--shadow-md);
}

main::before,
main::after {
  display: none;
}

/* ==========================================================================
   Post Listings
   ========================================================================== */
.post-summary {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent-gold);
  position: relative;
  transition: all 0.2s ease;
}

.post-summary::before {
  display: none;
}

.post-summary:hover {
  background: var(--bg-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.post-summary h2 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
  border-bottom: none;
  color: var(--text-bright);
  text-shadow: none;
}

.post-summary h2 a {
  color: var(--text-bright);
  transition: color 0.18s ease;
}

.post-summary h2 a:hover {
  color: var(--accent-gold);
}

.post-summary h2 a::after {
  display: none;
}

.post-summary p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.post-summary:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Post Metadata
   ========================================================================== */
.post-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.25rem 0.6rem;
  background: rgba(68, 176, 126, 0.08);
  border: 1px solid rgba(68, 176, 126, 0.22);
  border-radius: 3px;
}

.post-date::before {
  content: none;
}

/* ==========================================================================
   Tags
   ========================================================================== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent-blue);
  padding: 0.2rem 0.6rem;
  background: rgba(78, 142, 247, 0.1);
  border: 1px solid rgba(78, 142, 247, 0.22);
  border-radius: 3px;
  transition: all 0.18s ease;
}

.tag::before {
  content: none;
}

.tag:hover {
  background: rgba(78, 142, 247, 0.18);
  border-color: var(--accent-blue);
  transform: none;
}

/* ==========================================================================
   Blockquotes
   ========================================================================== */
blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-gold);
  background: rgba(200, 137, 42, 0.06);
  color: var(--text-secondary);
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote + p:has(> a:only-child) {
  margin-top: -0.75rem;
  padding: 0.4rem 1.25rem;
  border-left: 3px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: normal;
}

/* ==========================================================================
   Code
   ========================================================================== */
pre, code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

code {
  background-color: var(--bg-elevated);
  color: var(--accent-gold);
  padding: 0.2em 0.45em;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

pre {
  background: var(--bg-elevated);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

pre::before {
  display: none;
}

pre code {
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  display: block;
  margin-top: 0;
}

main .highlight {
  background: var(--bg-elevated);
  border-radius: 4px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
  border: 1px solid var(--border-subtle);
}

main .highlight::before {
  display: none;
}

main .highlight pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

main .highlight pre::before {
  display: none;
}

main .highlight code {
  background: transparent;
  padding: 0;
  border: none;
}

p code, li code {
  background-color: var(--bg-elevated);
  color: var(--accent-gold);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  font-size: 0.9em;
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Callouts
   ========================================================================== */
.callout {
  margin: 2rem 0;
  background: var(--bg-elevated);
  border: 1px solid;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.callout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
}

.callout-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.callout-title::before {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.callout-content {
  padding: 0.9rem 1.1rem;
  border-top: 1px solid var(--border-faint);
}

.callout-content:empty {
  display: none;
}

.callout-content p:last-child {
  margin-bottom: 0;
}

.callout-note {
  border-color: var(--accent-blue);
}

.callout-note::before {
  background: var(--accent-blue);
}

.callout-note .callout-title {
  background: rgba(78, 142, 247, 0.1);
  color: var(--accent-blue);
}

.callout-note .callout-title::before {
  content: "◆";
}

.callout-tip {
  border-color: var(--accent-green);
}

.callout-tip::before {
  background: var(--accent-green);
}

.callout-tip .callout-title {
  background: rgba(68, 176, 126, 0.1);
  color: var(--accent-green);
}

.callout-tip .callout-title::before {
  content: "▸";
}

.callout-warning {
  border-color: var(--warning);
}

.callout-warning::before {
  background: var(--warning);
}

.callout-warning .callout-title {
  background: rgba(232, 160, 32, 0.1);
  color: var(--warning);
}

.callout-warning .callout-title::before {
  content: "▲";
}

.callout-danger,
.callout-important {
  border-color: var(--danger);
}

.callout-danger::before,
.callout-important::before {
  background: var(--danger);
}

.callout-danger .callout-title,
.callout-important .callout-title {
  background: rgba(224, 84, 84, 0.1);
  color: var(--danger);
}

.callout-danger .callout-title::before,
.callout-important .callout-title::before {
  content: "■";
}

.callout-info {
  border-color: var(--accent-gold);
}

.callout-info::before {
  background: var(--accent-gold);
}

.callout-info .callout-title {
  background: rgba(200, 137, 42, 0.1);
  color: var(--accent-gold);
}

.callout-info .callout-title::before {
  content: "◆";
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

footer::before {
  display: none;
}

footer p {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

footer a {
  color: var(--accent-gold);
  font-weight: 400;
}

/* ==========================================================================
   Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-hover);
}

/* ==========================================================================
   Selection
   ========================================================================== */
::selection {
  background: rgba(200, 137, 42, 0.3);
  color: var(--text-bright);
  text-shadow: none;
}

::-moz-selection {
  background: rgba(200, 137, 42, 0.3);
  color: var(--text-bright);
  text-shadow: none;
}

/* ==========================================================================
   Lists
   ========================================================================== */
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  position: relative;
}

ul li::marker {
  color: var(--accent-gold);
}

ol li::marker {
  color: var(--accent-blue);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --grid-width: 95%;
  }

  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  header::before {
    display: none;
  }

  nav ul li a {
    font-size: 0.73rem;
    padding: 0.4rem 0.7rem;
    clip-path: none;
  }

  main {
    padding: 1.5rem;
    clip-path: none;
  }

  main::before {
    clip-path: none;
  }

  .post-summary {
    padding: 1rem;
  }

  .post-summary h2 {
    font-size: 1.05rem;
  }

  pre, main .highlight {
    padding: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Share Buttons
   ========================================================================== */
.share-buttons {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75em;
}

.share-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.share-button {
  display: inline-block;
  padding: 0.4em 1em;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}

a.share-button::after {
  display: none;
}

.share-button svg {
  width: 16px;
  height: 16px;
  vertical-align: -0.15em;
  margin-right: 0.3em;
}

.share-linkedin {
  background-color: #0a66c2;
  color: #ffffff;
}

.share-linkedin:visited {
  color: #ffffff;
}

.share-linkedin:hover {
  background-color: #004182;
  color: #ffffff;
  border: none;
}

.share-hackernews {
  background-color: #ff6600;
  color: #ffffff;
}

.share-hackernews:visited {
  color: #ffffff;
}

.share-hackernews:hover {
  background-color: #cc5200;
  color: #ffffff;
  border: none;
}

.share-bluesky {
  background-color: #0085ff;
  color: #ffffff;
}

.share-bluesky:visited {
  color: #ffffff;
}

.share-bluesky:hover {
  background-color: #0066cc;
  color: #ffffff;
  border: none;
}

/* Syntax highlighting (Pygments) */
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #282C34; color: #ABB2BF }
.highlight .c { color: #7F848E } /* Comment */
.highlight .err { color: #ABB2BF } /* Error */
.highlight .esc { color: #ABB2BF } /* Escape */
.highlight .g { color: #ABB2BF } /* Generic */
.highlight .k { color: #C678DD } /* Keyword */
.highlight .l { color: #ABB2BF } /* Literal */
.highlight .n { color: #E06C75 } /* Name */
.highlight .o { color: #56B6C2 } /* Operator */
.highlight .x { color: #ABB2BF } /* Other */
.highlight .p { color: #ABB2BF } /* Punctuation */
.highlight .ch { color: #7F848E } /* Comment.Hashbang */
.highlight .cm { color: #7F848E } /* Comment.Multiline */
.highlight .cp { color: #7F848E } /* Comment.Preproc */
.highlight .cpf { color: #7F848E } /* Comment.PreprocFile */
.highlight .c1 { color: #7F848E } /* Comment.Single */
.highlight .cs { color: #7F848E } /* Comment.Special */
.highlight .gd { color: #ABB2BF } /* Generic.Deleted */
.highlight .ge { color: #ABB2BF } /* Generic.Emph */
.highlight .ges { color: #ABB2BF } /* Generic.EmphStrong */
.highlight .gr { color: #ABB2BF } /* Generic.Error */
.highlight .gh { color: #ABB2BF } /* Generic.Heading */
.highlight .gi { color: #ABB2BF } /* Generic.Inserted */
.highlight .go { color: #ABB2BF } /* Generic.Output */
.highlight .gp { color: #ABB2BF } /* Generic.Prompt */
.highlight .gs { color: #ABB2BF } /* Generic.Strong */
.highlight .gu { color: #ABB2BF } /* Generic.Subheading */
.highlight .gt { color: #ABB2BF } /* Generic.Traceback */
.highlight .kc { color: #E5C07B } /* Keyword.Constant */
.highlight .kd { color: #C678DD } /* Keyword.Declaration */
.highlight .kn { color: #C678DD } /* Keyword.Namespace */
.highlight .kp { color: #C678DD } /* Keyword.Pseudo */
.highlight .kr { color: #C678DD } /* Keyword.Reserved */
.highlight .kt { color: #E5C07B } /* Keyword.Type */
.highlight .ld { color: #ABB2BF } /* Literal.Date */
.highlight .m { color: #D19A66 } /* Literal.Number */
.highlight .s { color: #98C379 } /* Literal.String */
.highlight .na { color: #E06C75 } /* Name.Attribute */
.highlight .nb { color: #E5C07B } /* Name.Builtin */
.highlight .nc { color: #E5C07B } /* Name.Class */
.highlight .no { color: #E06C75 } /* Name.Constant */
.highlight .nd { color: #61AFEF } /* Name.Decorator */
.highlight .ni { color: #E06C75 } /* Name.Entity */
.highlight .ne { color: #E06C75 } /* Name.Exception */
.highlight .nf { color: #61AFEF; font-weight: bold } /* Name.Function */
.highlight .nl { color: #E06C75 } /* Name.Label */
.highlight .nn { color: #E06C75 } /* Name.Namespace */
.highlight .nx { color: #E06C75 } /* Name.Other */
.highlight .py { color: #E06C75 } /* Name.Property */
.highlight .nt { color: #E06C75 } /* Name.Tag */
.highlight .nv { color: #E06C75 } /* Name.Variable */
.highlight .ow { color: #56B6C2 } /* Operator.Word */
.highlight .pm { color: #ABB2BF } /* Punctuation.Marker */
.highlight .w { color: #ABB2BF } /* Text.Whitespace */
.highlight .mb { color: #D19A66 } /* Literal.Number.Bin */
.highlight .mf { color: #D19A66 } /* Literal.Number.Float */
.highlight .mh { color: #D19A66 } /* Literal.Number.Hex */
.highlight .mi { color: #D19A66 } /* Literal.Number.Integer */
.highlight .mo { color: #D19A66 } /* Literal.Number.Oct */
.highlight .sa { color: #98C379 } /* Literal.String.Affix */
.highlight .sb { color: #98C379 } /* Literal.String.Backtick */
.highlight .sc { color: #98C379 } /* Literal.String.Char */
.highlight .dl { color: #98C379 } /* Literal.String.Delimiter */
.highlight .sd { color: #98C379 } /* Literal.String.Doc */
.highlight .s2 { color: #98C379 } /* Literal.String.Double */
.highlight .se { color: #98C379 } /* Literal.String.Escape */
.highlight .sh { color: #98C379 } /* Literal.String.Heredoc */
.highlight .si { color: #98C379 } /* Literal.String.Interpol */
.highlight .sx { color: #98C379 } /* Literal.String.Other */
.highlight .sr { color: #98C379 } /* Literal.String.Regex */
.highlight .s1 { color: #98C379 } /* Literal.String.Single */
.highlight .ss { color: #98C379 } /* Literal.String.Symbol */
.highlight .bp { color: #E5C07B } /* Name.Builtin.Pseudo */
.highlight .fm { color: #56B6C2; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #E06C75 } /* Name.Variable.Class */
.highlight .vg { color: #E06C75 } /* Name.Variable.Global */
.highlight .vi { color: #E06C75 } /* Name.Variable.Instance */
.highlight .vm { color: #E06C75 } /* Name.Variable.Magic */
.highlight .il { color: #D19A66 } /* Literal.Number.Integer.Long */