/*
Theme Name: NodeSeek Style
Theme URI: https://example.com/nodeseek-style
Author: Codex
Description: A bold, card-first WordPress theme inspired by NodeSeek.
Version: 1.0.0
Text Domain: nodeseek-style
*/

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Source+Serif+4:wght@400;500;600&display=swap");

:root {
  --font-sans: "Space Grotesk", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Times New Roman", serif;
  --bg: #f5f7fb;
  --bg-elev: #ffffff;
  --bg-muted: #eef2f8;
  --text: #0f172a;
  --text-muted: #6b7280;
  --border: #e2e8f0;
  --brand: #1d4ed8;
  --brand-2: #0f766e;
  --accent: #f97316;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --content-width: 1180px;
}

body.theme-dark {
  --bg: #0b0f19;
  --bg-elev: #101626;
  --bg-muted: #141c2e;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #1f2a44;
  --brand: #60a5fa;
  --brand-2: #2dd4bf;
  --accent: #fb923c;
  --shadow: 0 24px 60px rgba(3, 7, 18, 0.5);
  --shadow-soft: 0 12px 30px rgba(3, 7, 18, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(29, 78, 216, 0.18), transparent 60%),
    radial-gradient(700px 420px at 88% 0%, rgba(15, 118, 110, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 45%),
    var(--bg);
  min-height: 100vh;
}

body.theme-dark {
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(96, 165, 250, 0.18), transparent 60%),
    radial-gradient(700px 420px at 88% 0%, rgba(45, 212, 191, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0) 45%),
    var(--bg);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(245, 247, 251, 0.82);
  backdrop-filter: blur(18px);
}

body.theme-dark .site-header {
  background: rgba(11, 15, 25, 0.75);
  border-bottom-color: rgba(31, 42, 68, 0.8);
}

.nav-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 20px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo img {
  max-height: 42px;
  width: auto;
}

.brand-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-nav .nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}

.site-nav .menu {
  margin: 0;
}

.site-nav .menu > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}

.site-nav .nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav .menu a {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links .current-menu-item > a {
  background: var(--bg-muted);
  color: var(--brand);
}

.site-nav .menu a:hover,
.site-nav .menu .current_page_item > a {
  background: var(--bg-muted);
  color: var(--brand);
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-self: end;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

.theme-toggle .toggle-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form input[type="search"] {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 10px 38px 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  min-width: 180px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input[type="search"]::placeholder {
  color: var(--text-muted);
}

.search-form input[type="search"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.search-form button {
  position: absolute;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
}

.site-main {
  flex: 1;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 40px 28px 80px;
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 32px;
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 36px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.18), transparent 65%);
}

.hero-title {
  font-size: 2.4rem;
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0;
}

.hero-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  justify-self: end;
  box-shadow: var(--shadow-soft);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: var(--bg-elev);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
  min-height: 100%;
}

.card-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.card-media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(29, 78, 216, 0.4);
  box-shadow: var(--shadow);
}

.card .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.card .card-title {
  font-size: 1.3rem;
  margin: 0;
  line-height: 1.3;
}

.card .card-excerpt {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.card .card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card .card-footer a {
  color: var(--brand);
  font-weight: 600;
}

.card .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.single-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.single-header {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.single-cover {
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.single-cover img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.single-title {
  margin: 0 0 12px;
  font-size: 2.5rem;
  letter-spacing: -0.03em;
}

.single-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.single-meta a {
  color: var(--brand);
  font-weight: 600;
}

.entry-content {
  font-family: var(--font-serif);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-soft);
  line-height: 1.75;
  font-size: 1.05rem;
}

.ns-locked {
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: var(--bg-muted);
  padding: 16px 18px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.ns-locked a {
  color: var(--brand);
  font-weight: 600;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--font-sans);
  margin-top: 2rem;
}

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

.search-title {
  font-size: 1.8rem;
  margin: 0 0 20px;
}

.pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}

.pagination .nav-links {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-weight: 600;
  font-size: 0.85rem;
}

.pagination .current {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.site-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  padding: 28px;
  background: var(--bg-elev);
}

.footer-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-shell a {
  color: var(--brand);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .nav-shell {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .site-nav .nav-links {
    justify-content: flex-start;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

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

  .hero-pill {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .site-main {
    padding: 28px 18px 60px;
  }

  .nav-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-form input[type="search"] {
    width: 100%;
  }

  .single-title {
    font-size: 2rem;
  }

  .entry-content {
    padding: 26px;
  }

  .footer-shell {
    flex-direction: column;
    gap: 10px;
  }
}
