/*
Theme Name:   LinuxOak
Theme URI:    https://lab.linuxoak.com
Description:  Modern-minimal child theme for OceanWP, tuned for code-heavy long-form technical posts. Light by default with automatic dark mode, generous whitespace, Inter for prose and JetBrains Mono for code.
Author:       LinuxOak
Template:     oceanwp
Version:      0.1.0
Text Domain:  linuxoak
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --lo-bg: #ffffff;
  --lo-bg-soft: #f7f8fa;
  --lo-fg: #0f172a;
  --lo-fg-muted: #475569;
  --lo-border: #e5e7eb;
  --lo-border-strong: #d4d4d8;
  --lo-accent: #2563eb;
  --lo-accent-hover: #1d4ed8;
  --lo-code-bg: #f4f4f5;
  --lo-code-fg: #18181b;
  --lo-code-border: #e4e4e7;
  --lo-selection: #dbeafe;

  --lo-radius: 6px;
  --lo-radius-lg: 10px;

  --lo-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lo-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --lo-content-width: 720px;
  --lo-container-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lo-bg: #0a0a0a;
    --lo-bg-soft: #111113;
    --lo-fg: #e5e7eb;
    --lo-fg-muted: #9ca3af;
    --lo-border: #1f2329;
    --lo-border-strong: #2a2f37;
    --lo-accent: #60a5fa;
    --lo-accent-hover: #93c5fd;
    --lo-code-bg: #18181b;
    --lo-code-fg: #f4f4f5;
    --lo-code-border: #27272a;
    --lo-selection: #1e3a8a;
  }
}

/* =========================================================
   Base
   ========================================================= */
html { scroll-behavior: smooth; }

body,
body.oceanwp-theme {
  background: var(--lo-bg);
  color: var(--lo-fg);
  font-family: var(--lo-font-sans);
  font-size: 17px;
  line-height: 1.7;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--lo-selection); color: var(--lo-fg); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--lo-font-sans);
  color: var(--lo-fg);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 2em;
  margin-bottom: 0.6em;
}
h1 { font-size: 2.1rem; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.125rem; }

/* Paragraphs & lists */
p, ul, ol { color: var(--lo-fg); margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 0.25em; }

/* Links */
a, a:visited {
  color: var(--lo-accent);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover {
  color: var(--lo-accent-hover);
  text-decoration: underline;
}

/* Inline code */
code, kbd, samp, tt {
  font-family: var(--lo-font-mono);
  font-size: 0.92em;
}
:not(pre) > code {
  background: var(--lo-code-bg);
  color: var(--lo-code-fg);
  border: 1px solid var(--lo-code-border);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  white-space: nowrap;
}

/* Code blocks (classic + Gutenberg) */
pre,
pre.wp-block-code,
.wp-block-code,
.wp-block-preformatted {
  background: var(--lo-code-bg);
  color: var(--lo-code-fg);
  border: 1px solid var(--lo-code-border);
  border-radius: var(--lo-radius);
  padding: 1rem 1.1rem;
  font-family: var(--lo-font-mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 1.4em 0;
  white-space: pre;
  tab-size: 4;
}
pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

/* Blockquotes */
blockquote, .wp-block-quote {
  border-left: 3px solid var(--lo-accent);
  background: var(--lo-bg-soft);
  margin: 1.5em 0;
  padding: 0.6em 1.1em;
  color: var(--lo-fg-muted);
  font-style: normal;
  border-radius: 0 var(--lo-radius) var(--lo-radius) 0;
}
blockquote p:last-child { margin-bottom: 0; }

/* Horizontal rule */
hr, .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--lo-border);
  margin: 2.5em 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  margin: 1.4em 0;
}
th, td {
  padding: 0.6em 0.8em;
  border-bottom: 1px solid var(--lo-border);
  text-align: left;
}
th {
  font-weight: 600;
  color: var(--lo-fg);
  background: var(--lo-bg-soft);
}

/* Images */
img { border-radius: var(--lo-radius); height: auto; max-width: 100%; }

/* =========================================================
   Layout
   ========================================================= */
#wrap, #main, #content-wrap {
  background: var(--lo-bg);
}

#content-wrap.container,
.container {
  max-width: var(--lo-container-width);
}

/* Single post: narrower readable column */
.single .entry,
.single #content-wrap .entry,
.page .entry {
  max-width: var(--lo-content-width);
  margin-left: auto;
  margin-right: auto;
}

/* Hide sidebar on single posts for distraction-free reading */
.single #right-sidebar,
.single #left-sidebar,
.single .content-area { width: 100%; }
.single #content-wrap .content-area { float: none; margin: 0 auto; }

/* =========================================================
   Header
   ========================================================= */
#site-header,
.site-header {
  background: var(--lo-bg);
  border-bottom: 1px solid var(--lo-border);
  box-shadow: none;
}

#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#site-logo,
.site-logo,
#site-logo .site-logo-text a,
.site-title a {
  font-family: var(--lo-font-sans);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--lo-fg) !important;
}

/* Navigation */
#site-navigation .dropdown-menu > li > a,
.main-navigation a,
#site-navigation-wrap .main-navigation .dropdown-menu a {
  font-family: var(--lo-font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--lo-fg) !important;
  letter-spacing: 0;
  text-transform: none;
  transition: color .15s ease;
}

#site-navigation .dropdown-menu > li > a:hover,
.main-navigation a:hover {
  color: var(--lo-accent) !important;
  background: transparent !important;
}

#site-navigation .dropdown-menu > li.current-menu-item > a,
#site-navigation .dropdown-menu > li.current-menu-ancestor > a {
  color: var(--lo-accent) !important;
}

/* Submenus */
#site-navigation .dropdown-menu ul {
  background: var(--lo-bg);
  border: 1px solid var(--lo-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-radius: var(--lo-radius);
}

/* =========================================================
   Page title / breadcrumbs
   ========================================================= */
#page-header,
.page-header-title,
.page-header {
  background: var(--lo-bg);
  border-bottom: 1px solid var(--lo-border);
  padding: 2.2rem 0 1.8rem;
}
.page-header-title,
.entry-title,
h1.page-header-title,
h1.entry-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--lo-fg);
}

/* =========================================================
   Post meta
   ========================================================= */
.entry-meta,
.meta-single,
.blog-entry-meta,
.below-entry-meta {
  font-family: var(--lo-font-sans);
  font-size: 0.875rem;
  color: var(--lo-fg-muted);
  border: 0;
  padding: 0;
  margin: 0.4em 0 1.6em;
}
.entry-meta a,
.meta-single a {
  color: var(--lo-fg-muted);
  border-bottom: 1px dashed var(--lo-border-strong);
}
.entry-meta a:hover,
.meta-single a:hover {
  color: var(--lo-accent);
  border-bottom-color: var(--lo-accent);
}
.entry-meta li,
.meta-single li {
  display: inline;
  margin: 0;
}
.entry-meta li + li::before,
.meta-single li + li::before {
  content: " · ";
  margin: 0 0.4em;
  color: var(--lo-border-strong);
}

/* =========================================================
   Blog archive cards
   ========================================================= */
.blog-entry,
article.post {
  border-bottom: 1px solid var(--lo-border);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}
.blog-entry:last-child,
article.post:last-child { border-bottom: 0; }

.blog-entry .entry-title,
article.post .entry-title {
  font-size: 1.5rem;
  margin: 0 0 0.4em;
}
.blog-entry .entry-title a,
article.post .entry-title a {
  color: var(--lo-fg);
}
.blog-entry .entry-title a:hover,
article.post .entry-title a:hover {
  color: var(--lo-accent);
}

.blog-entry .entry-summary,
.blog-entry .entry,
article.post .entry-summary {
  color: var(--lo-fg-muted);
  font-size: 1rem;
}

/* "Read more" link */
.read-more, .read-more-link, a.more-link {
  font-weight: 500;
  color: var(--lo-accent) !important;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
}
.read-more::after, a.more-link::after { content: " →"; }

/* =========================================================
   Buttons
   ========================================================= */
button,
input[type="submit"],
.button,
.theme-button,
.wp-block-button__link {
  background: var(--lo-accent);
  color: #fff;
  border: 0;
  padding: 0.6em 1.1em;
  border-radius: var(--lo-radius);
  font-family: var(--lo-font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
}
button:hover,
input[type="submit"]:hover,
.button:hover,
.wp-block-button__link:hover {
  background: var(--lo-accent-hover);
  color: #fff;
}
button:active { transform: translateY(1px); }

/* Form fields */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select {
  background: var(--lo-bg);
  color: var(--lo-fg);
  border: 1px solid var(--lo-border-strong);
  border-radius: var(--lo-radius);
  padding: 0.55em 0.75em;
  font-family: var(--lo-font-sans);
  font-size: 1rem;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: var(--lo-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lo-accent) 20%, transparent);
}

/* =========================================================
   Comments
   ========================================================= */
#comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--lo-border);
}
.comment-list { list-style: none; padding: 0; }
.comment-list li.comment {
  border: 1px solid var(--lo-border);
  border-radius: var(--lo-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  background: var(--lo-bg-soft);
}
.comment-author cite { font-weight: 600; font-style: normal; }
.comment-meta, .comment-metadata { font-size: 0.85rem; color: var(--lo-fg-muted); }

/* =========================================================
   Sidebar widgets
   ========================================================= */
#right-sidebar .sidebar-box,
#left-sidebar .sidebar-box {
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: 2.2rem;
}
.widget-title,
.sidebar-box .widget-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lo-fg-muted);
  border: 0;
  margin-bottom: 0.8em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--lo-border);
}
.sidebar-box ul { list-style: none; padding: 0; }
.sidebar-box ul li {
  padding: 0.35em 0;
  border-bottom: 1px dashed var(--lo-border);
  font-size: 0.95rem;
}
.sidebar-box ul li:last-child { border-bottom: 0; }

/* =========================================================
   Footer
   ========================================================= */
#footer-widgets,
#site-footer,
.site-footer,
#footer-bottom {
  background: var(--lo-bg-soft);
  border-top: 1px solid var(--lo-border);
  color: var(--lo-fg-muted);
}
#footer-bottom {
  font-size: 0.875rem;
  padding: 1.4rem 0;
}
#footer-bottom a { color: var(--lo-fg-muted); }
#footer-bottom a:hover { color: var(--lo-accent); }

/* =========================================================
   404 / search
   ========================================================= */
.error404 .entry-title,
.search-no-results .entry-title {
  font-size: 2rem;
}

/* =========================================================
   Small screens
   ========================================================= */
@media (max-width: 768px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }
  pre, .wp-block-code { font-size: 13px; padding: 0.85rem; }
  .single .entry, .page .entry { padding: 0 1rem; }
}
