/*
Theme Name: LynkMesh AI Blog
Theme URI: https://lynkmesh.local
Author: LynkMesh
Author URI: https://lynkmesh.local
Description: A simple dark AI/developer/coding blog theme for LynkMesh. Built for readable articles, technical notes, and product updates.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lynkmesh-ai
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --lm-bg: #070b14;
  --lm-bg-soft: #0d1324;
  --lm-card: rgba(17, 25, 45, 0.78);
  --lm-card-solid: #11192d;
  --lm-border: rgba(140, 160, 255, 0.16);
  --lm-text: #eef3ff;
  --lm-muted: #9eabc8;
  --lm-accent: #7c5cff;
  --lm-accent-2: #21d4fd;
  --lm-success: #3ef7a8;
  --lm-code-bg: #050814;
  --lm-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --lm-radius: 22px;
  --lm-radius-sm: 14px;
  --lm-max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--lm-text);
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.24), transparent 34rem),
    radial-gradient(circle at top right, rgba(33, 212, 253, 0.16), transparent 32rem),
    var(--lm-bg);
  line-height: 1.7;
}

body.menu-open {
  overflow: hidden;
}

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

a:hover {
  color: var(--lm-accent-2);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--lm-radius-sm);
}

p {
  margin: 0 0 1.25rem;
}

code,
pre,
kbd,
samp {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
  padding: 0.18rem 0.4rem;
  border: 1px solid var(--lm-border);
  border-radius: 8px;
  color: #c8f7ff;
  background: rgba(33, 212, 253, 0.09);
}

pre {
  overflow-x: auto;
  padding: 1.2rem;
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-sm);
  color: #d8e6ff;
  background: var(--lm-code-bg);
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

blockquote {
  margin: 1.6rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--lm-accent-2);
  border-radius: 0 var(--lm-radius-sm) var(--lm-radius-sm) 0;
  color: #dbe6ff;
  background: rgba(33, 212, 253, 0.08);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-wrap {
  min-height: 100vh;
}

.lm-container {
  width: min(100% - 2rem, var(--lm-max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--lm-border);
  background: rgba(7, 11, 20, 0.76);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 76px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.custom-logo-link img {
  display: block;
  max-height: 42px;
  width: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(33, 212, 253, 0.32);
  border-radius: 14px;
  color: var(--lm-bg);
  font-weight: 900;
  letter-spacing: -0.08em;
  background: linear-gradient(135deg, var(--lm-accent-2), var(--lm-success));
  box-shadow: 0 0 24px rgba(33, 212, 253, 0.28);
}

.site-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.site-title a {
  color: var(--lm-text);
}

.site-description {
  margin: 0.18rem 0 0;
  color: var(--lm-muted);
  font-size: 0.84rem;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--lm-border);
  border-radius: 12px;
  color: var(--lm-text);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}

.nav-menu,
.nav-menu ul {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu a {
  display: inline-flex;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  color: var(--lm-muted);
  font-size: 0.94rem;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: var(--lm-text);
  background: rgba(255, 255, 255, 0.07);
}

.hero {
  position: relative;
  padding: clamp(4.5rem, 8vw, 7rem) 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--lm-border);
  border-radius: 999px;
  color: #d7e4ff;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.eyebrow::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--lm-success);
  box-shadow: 0 0 18px var(--lm-success);
}

.hero-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(135deg, var(--lm-accent-2), #ffffff 45%, var(--lm-accent));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy {
  max-width: 650px;
  margin-top: 1.25rem;
  color: var(--lm-muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.lm-button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--lm-text);
  background: linear-gradient(135deg, var(--lm-accent), #4c9bff);
  box-shadow: 0 16px 44px rgba(124, 92, 255, 0.24);
  cursor: pointer;
}

.lm-button.secondary {
  color: #dbe6ff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.hero-panel {
  position: relative;
  padding: 1.1rem;
  border: 1px solid var(--lm-border);
  border-radius: calc(var(--lm-radius) + 10px);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  box-shadow: var(--lm-shadow);
}

.code-window {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--lm-radius);
  background: #050814;
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--lm-muted);
  font-size: 0.82rem;
  background: rgba(255,255,255,0.04);
}

.window-dots {
  display: flex;
  gap: 0.42rem;
}

.window-dots span {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
}

.code-lines {
  padding: 1.1rem;
  color: #dfe9ff;
  font-size: 0.88rem;
}

.code-line {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.code-num {
  min-width: 1.5rem;
  color: rgba(158,171,200,0.55);
  text-align: right;
}

.token-accent { color: var(--lm-accent-2); }
.token-purple { color: #bba8ff; }
.token-green { color: var(--lm-success); }
.token-muted { color: var(--lm-muted); }

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.feature-chip {
  padding: 0.9rem;
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-sm);
  background: rgba(255,255,255,0.04);
}

.feature-chip strong {
  display: block;
  line-height: 1.2;
}

.feature-chip span {
  display: block;
  margin-top: 0.25rem;
  color: var(--lm-muted);
  font-size: 0.84rem;
}

.site-main {
  padding: 2.4rem 0 4rem;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.post-card,
.content-card,
.widget,
.comments-area,
.comment-respond {
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius);
  background: var(--lm-card);
  box-shadow: var(--lm-shadow);
}

.post-card {
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(33, 212, 253, 0.32);
}

.post-thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
}

.post-card-body,
.content-card,
.widget,
.comments-area,
.comment-respond {
  padding: clamp(1rem, 2vw, 1.35rem);
}

.post-meta,
.entry-meta,
.entry-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--lm-muted);
  font-size: 0.86rem;
}

.post-meta a,
.entry-meta a,
.entry-footer a {
  color: #c9d6ff;
}

.entry-title,
.post-card-title,
.page-title {
  margin: 0 0 0.75rem;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.post-card-title {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.entry-title,
.page-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.post-card-title a:hover {
  color: var(--lm-accent-2);
}

.post-excerpt,
.archive-description {
  color: var(--lm-muted);
}

.read-more {
  display: inline-flex;
  margin-top: 0.85rem;
  color: var(--lm-accent-2);
  font-weight: 700;
}

.sidebar {
  position: sticky;
  top: 96px;
}

.widget {
  margin-bottom: 1rem;
}

.widget-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.widget ul {
  margin: 0;
  padding-left: 1.1rem;
}

.widget li + li {
  margin-top: 0.45rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--lm-border);
  border-radius: 14px;
  color: var(--lm-text);
  background: rgba(255,255,255,0.05);
}

textarea {
  min-height: 140px;
}

.search-submit {
  flex: 0 0 auto;
}

.entry-content {
  color: #dbe5fb;
}

.entry-content a {
  color: var(--lm-accent-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  margin-top: 2rem;
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-sm);
}

.entry-content th,
.entry-content td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--lm-border);
  text-align: left;
}

.entry-content th {
  background: rgba(255,255,255,0.06);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.nav-links a,
.nav-links span {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--lm-border);
  border-radius: 999px;
  color: var(--lm-text);
  background: rgba(255,255,255,0.04);
}

.nav-links .current {
  border-color: rgba(33,212,253,0.36);
  background: rgba(33,212,253,0.12);
}

.post-navigation .nav-links {
  justify-content: space-between;
}

.comments-area,
.comment-respond {
  margin-top: 1.2rem;
}

.comment-list {
  padding-left: 1.2rem;
}

.comment-list li {
  margin-bottom: 1rem;
}

.site-footer {
  border-top: 1px solid var(--lm-border);
  color: var(--lm-muted);
  background: rgba(5, 8, 20, 0.62);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
}

.footer-brand {
  color: var(--lm-text);
  font-weight: 800;
}

@media (max-width: 920px) {
  .hero-grid,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-navigation {
    position: relative;
  }

  .nav-menu {
    position: fixed;
    inset: 76px 1rem auto 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid var(--lm-border);
    border-radius: var(--lm-radius);
    background: rgba(7,11,20,0.96);
    box-shadow: var(--lm-shadow);
  }

  body.menu-open .nav-menu {
    display: flex;
  }

  .nav-menu a {
    width: 100%;
  }

  .posts-grid,
  .feature-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

  .search-form {
    flex-direction: column;
  }
}
