/*
Theme Name: NerdExpert Terminal
Theme URI: https://nerdexpert.com.br/
Author: NerdExpert
Description: Tema editorial escuro, inspirado em interfaces de terminal para conteúdo de tecnologia.
Version: 1.0.6
Text Domain: nerdexpert-terminal
*/

:root {
  --ne-bg: #090d12;
  --ne-surface: #10171f;
  --ne-surface-raised: #151e28;
  --ne-text: #e7eef5;
  --ne-muted: #93a1b1;
  --ne-line: rgba(207, 230, 246, .11);
  --ne-green: #8afb8a;
  --ne-blue: #33c1ff;
  --ne-orange: #ffb86b;
  --ne-shadow: 0 18px 55px rgba(0, 0, 0, .28);
  --ne-radius: 14px;
  --ne-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ne-bg); color: var(--ne-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; }
body:before { background: radial-gradient(circle at 14% 0, rgba(51, 193, 255, .1), transparent 27rem), radial-gradient(circle at 88% 30rem, rgba(138, 251, 138, .05), transparent 30rem); content: ""; inset: 0; pointer-events: none; position: fixed; z-index: -1; }
img { display: block; height: auto; max-width: 100%; }
a { color: var(--ne-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ne-green); }
button, input { font: inherit; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.screen-reader-text:focus { background: var(--ne-surface-raised); clip: auto; clip-path: none; color: var(--ne-text); display: block; height: auto; left: 1rem; padding: .75rem 1rem; top: 1rem; width: auto; z-index: 100; }
.ne-container { margin-inline: auto; max-width: var(--ne-width); padding-inline: 24px; }

/* Cabeçalho */
.ne-status { align-items: center; background: rgba(9, 13, 18, .82); border-bottom: 1px solid var(--ne-line); display: flex; font-family: "Source Code Pro", ui-monospace, monospace; font-size: .72rem; justify-content: space-between; letter-spacing: .04em; min-height: 35px; padding: 0 24px; }
.ne-status__group { align-items: center; display: flex; gap: 7px; }
.ne-dot { background: var(--ne-green); border-radius: 999px; box-shadow: 0 0 9px currentColor; color: var(--ne-green); display: block; height: 8px; width: 8px; }
.ne-dot--blue { background: var(--ne-blue); color: var(--ne-blue); }
.ne-dot--orange { background: var(--ne-orange); color: var(--ne-orange); }
.ne-status__label { color: var(--ne-muted); }
.ne-status__right { color: var(--ne-green); }
.ne-header { backdrop-filter: blur(14px); background: rgba(9, 13, 18, .86); border-bottom: 1px solid var(--ne-line); position: sticky; top: 0; z-index: 30; }
.ne-header__inner { align-items: center; display: flex; gap: 28px; justify-content: space-between; min-height: 76px; }
.ne-brand { align-items: center; display: flex; }
.ne-brand a { display: block; line-height: 0; }
.ne-brand img, .ne-brand .custom-logo { height: auto; max-height: 45px; width: auto; }
.ne-menu { align-items: center; display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.ne-menu li { position: relative; }
.ne-menu a { color: var(--ne-muted); font-family: "Source Code Pro", ui-monospace, monospace; font-size: .8rem; text-decoration: none; }
.ne-menu a:hover, .ne-menu .current-menu-item > a, .ne-menu .current_page_item > a { color: var(--ne-green); }
.ne-menu .menu-item-has-children > a:after { color: var(--ne-blue); content: "⌄"; font-size: .78em; margin-left: .35rem; }
.ne-menu .sub-menu { background: var(--ne-surface-raised); border: 1px solid var(--ne-line); border-radius: 9px; box-shadow: var(--ne-shadow); display: grid; gap: 2px; left: -14px; list-style: none; margin: 0; min-width: 205px; opacity: 0; padding: 8px; pointer-events: none; position: absolute; top: calc(100% + 14px); transform: translateY(-5px); transition: opacity .16s ease, transform .16s ease; visibility: hidden; z-index: 40; }
.ne-menu .sub-menu:before { content: ""; height: 14px; left: 0; position: absolute; right: 0; top: -14px; }
.ne-menu .sub-menu a { display: block; padding: .45rem .55rem; }
.ne-menu .menu-item-has-children:hover > .sub-menu, .ne-menu .menu-item-has-children:focus-within > .sub-menu, .ne-menu .menu-item-has-children.is-open > .sub-menu { opacity: 1; pointer-events: auto; transform: translateY(0); visibility: visible; }
.ne-submenu-toggle { background: transparent; border: 0; color: var(--ne-blue); cursor: pointer; font-size: 1rem; line-height: 1; margin-left: .1rem; padding: .35rem; }
.ne-submenu-toggle:hover, .ne-submenu-toggle:focus-visible { color: var(--ne-green); }
.ne-menu .menu-item-has-children.is-open > .ne-submenu-toggle { transform: rotate(180deg); }
.ne-header__tools { align-items: center; display: flex; gap: 12px; }
.ne-search-toggle, .ne-menu-toggle { background: transparent; border: 1px solid var(--ne-line); border-radius: 8px; color: var(--ne-text); cursor: pointer; display: grid; height: 36px; place-items: center; width: 38px; }
.ne-search-toggle:hover, .ne-menu-toggle:hover { border-color: var(--ne-blue); color: var(--ne-blue); }
.ne-menu-toggle { display: none; }
.ne-search-panel { background: var(--ne-surface); border-bottom: 1px solid var(--ne-line); display: none; padding: 18px 0; }
.ne-search-panel.is-open { display: block; }
.ne-search-form { display: flex; gap: 10px; }
.ne-search-form label { flex: 1; }
.ne-search-form input { background: #0b1117; border: 1px solid var(--ne-line); border-radius: 8px; color: var(--ne-text); padding: .7rem .85rem; width: 100%; }
.ne-search-form button, .ne-button { background: linear-gradient(100deg, var(--ne-green), var(--ne-blue)); border: 0; border-radius: 8px; color: #07151a; cursor: pointer; font-weight: 800; padding: .7rem 1rem; text-decoration: none; }

/* Home */
.ne-main { padding-block: 40px 70px; }
.ne-kicker { color: var(--ne-green); display: block; font-family: "Source Code Pro", ui-monospace, monospace; font-size: .74rem; font-weight: 600; letter-spacing: .1em; margin-bottom: 12px; text-transform: uppercase; }
.ne-kicker:before { content: "// "; color: var(--ne-blue); }
.ne-featured { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .9fr); margin-bottom: 64px; }
.ne-featured__lead { background: var(--ne-surface); border: 1px solid var(--ne-line); border-radius: var(--ne-radius); min-height: 465px; overflow: hidden; position: relative; }
.ne-featured__lead:after { background: linear-gradient(180deg, transparent 18%, rgba(9, 13, 18, .94) 100%); content: ""; inset: 0; position: absolute; }
.ne-featured__lead .ne-post-image, .ne-featured__lead .ne-post-image img { height: 100%; object-fit: cover; position: absolute; width: 100%; }
.ne-featured__content { bottom: 0; left: 0; padding: 34px; position: absolute; right: 0; z-index: 1; }
.ne-post-category { color: var(--ne-green); font-family: "Source Code Pro", ui-monospace, monospace; font-size: .73rem; font-weight: 600; letter-spacing: .075em; text-decoration: none; text-transform: uppercase; }
.ne-featured h1 { font-size: clamp(1.75rem, 4vw, 3.1rem); line-height: 1.1; margin: 10px 0 14px; max-width: 850px; }
.ne-featured h1 a, .ne-card h2 a { color: inherit; text-decoration: none; }
.ne-post-meta { color: var(--ne-muted); font-size: .82rem; }
.ne-featured__rail { display: grid; gap: 20px; grid-template-rows: 1fr 1fr; }
.ne-rail-card { background: var(--ne-surface); border: 1px solid var(--ne-line); border-radius: var(--ne-radius); display: grid; grid-template-columns: 120px 1fr; overflow: hidden; transition: border-color .2s, transform .2s; }
.ne-rail-card:hover, .ne-card:hover { border-color: rgba(51,193,255,.55); transform: translateY(-4px); }
.ne-rail-card__image, .ne-rail-card__image img { height: 100%; min-height: 150px; object-fit: cover; width: 100%; }
.ne-rail-card__body { padding: 18px; }
.ne-rail-card h2 { font-size: 1.05rem; line-height: 1.25; margin: 8px 0; }
.ne-rail-card h2 a { color: var(--ne-text); text-decoration: none; }
.ne-section { margin-top: 60px; }
.ne-section__header { align-items: end; border-bottom: 1px solid var(--ne-line); display: flex; justify-content: space-between; margin-bottom: 22px; padding-bottom: 14px; }
.ne-section__title { font-family: "Source Code Pro", ui-monospace, monospace; font-size: 1.05rem; margin: 0; }
.ne-section__title:before { color: var(--ne-blue); content: "# "; }
.ne-section__link { font-family: "Source Code Pro", ui-monospace, monospace; font-size: .75rem; text-decoration: none; }
.ne-post-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.ne-card { background: var(--ne-surface); border: 1px solid var(--ne-line); border-radius: var(--ne-radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.ne-card__image { background: var(--ne-surface-raised); display: block; height: 180px; }
.ne-card__image img { height: 100%; object-fit: cover; width: 100%; }
.ne-placeholder { background: linear-gradient(135deg, rgba(51,193,255,.18), rgba(138,251,138,.06)); height: 100%; min-height: inherit; position: relative; width: 100%; }
.ne-placeholder:after { color: rgba(231,238,245,.45); content: ">_"; font-family: "Source Code Pro", ui-monospace, monospace; font-size: 2rem; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); }
.ne-card__body { padding: 20px; }
.ne-card h2 { font-size: 1.15rem; line-height: 1.3; margin: 9px 0 12px; }
.ne-card .ne-post-meta { border-top: 1px solid var(--ne-line); padding-top: 12px; }
.ne-topic-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
.ne-topic { background: linear-gradient(145deg, rgba(51,193,255,.1), rgba(138,251,138,.025)); border: 1px solid var(--ne-line); border-radius: 10px; color: var(--ne-text); min-height: 132px; padding: 20px; text-decoration: none; transition: transform .2s, border-color .2s; }
.ne-topic:hover { border-color: var(--ne-green); color: var(--ne-text); transform: translateY(-3px); }
.ne-topic__number { color: var(--ne-muted); font-family: "Source Code Pro", ui-monospace, monospace; font-size: .72rem; }
.ne-topic h3 { font-family: "Source Code Pro", ui-monospace, monospace; font-size: 1rem; margin: 15px 0 0; }

/* Listagens e artigo */
.ne-page-heading { border-bottom: 1px solid var(--ne-line); margin-bottom: 32px; padding-bottom: 24px; }
.ne-page-heading h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; margin: 0; }
.ne-page-heading p { color: var(--ne-muted); margin-bottom: 0; }
.ne-content-grid { display: grid; gap: 36px; grid-template-columns: minmax(0, 1fr) 280px; }
.ne-list { display: grid; gap: 18px; }
.ne-list-card { background: var(--ne-surface); border: 1px solid var(--ne-line); border-radius: var(--ne-radius); display: grid; grid-template-columns: 220px 1fr; overflow: hidden; }
.ne-list-card__image, .ne-list-card__image img { height: 100%; min-height: 180px; object-fit: cover; width: 100%; }
.ne-list-card__body { padding: 23px; }
.ne-list-card h2 { font-size: 1.35rem; line-height: 1.25; margin: 8px 0 10px; }
.ne-list-card h2 a { color: var(--ne-text); text-decoration: none; }
.ne-list-card p { color: var(--ne-muted); font-size: .93rem; margin: 12px 0 0; }
.ne-sidebar { border-left: 1px solid var(--ne-line); padding-left: 25px; }
.ne-sidebar h2 { font-family: "Source Code Pro", ui-monospace, monospace; font-size: .92rem; }
.ne-sidebar ul { list-style: none; margin: 0; padding: 0; }
.ne-sidebar li { border-bottom: 1px solid var(--ne-line); padding: 9px 0; }
.ne-sidebar a { color: var(--ne-muted); font-size: .86rem; text-decoration: none; }
.ne-sidebar a:hover { color: var(--ne-green); }
.ne-widget { border-bottom: 1px solid var(--ne-line); margin-bottom: 22px; padding-bottom: 20px; }
.ne-widget__title { font-family: "Source Code Pro", ui-monospace, monospace; font-size: .92rem; margin: 0 0 12px; }
.ne-widget .wp-block-search__inside-wrapper { border-color: var(--ne-line); }
.ne-widget input { background: #0b1117; border: 1px solid var(--ne-line); border-radius: 7px; color: var(--ne-text); max-width: 100%; padding: .5rem; }
.ne-widget button { background: var(--ne-blue); border: 0; border-radius: 6px; color: #061217; cursor: pointer; padding: .5rem .7rem; }
.ne-widget .adsbygoogle { max-width: 100%; }
.ne-widget--sticky-ad { position: sticky; top: 96px; z-index: 2; }
.ne-content-grid--article .ne-article { margin: 0; max-width: none; }
.ne-article { margin-inline: auto; max-width: 820px; }
.ne-article__header { border-bottom: 1px solid var(--ne-line); margin-bottom: 32px; padding-bottom: 27px; }
.ne-article__title { font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.035em; line-height: 1.08; margin: 10px 0 16px; }
.ne-article__thumbnail { border-radius: var(--ne-radius); margin: 0 0 36px; overflow: hidden; }
.ne-article__thumbnail img { width: 100%; }
.ne-entry-content { color: #c7d2dd; font-size: 1.08rem; }
.ne-entry-content > * { margin-block: 0 1.45rem; }
.ne-entry-content h2, .ne-entry-content h3, .ne-entry-content h4 { color: var(--ne-text); line-height: 1.2; margin-top: 2.2em; }
.ne-entry-content h2 { font-size: 1.7rem; }
.ne-entry-content a { color: var(--ne-blue); }
.ne-entry-content blockquote { border-left: 3px solid var(--ne-green); color: var(--ne-text); margin-left: 0; padding: .3rem 0 .3rem 1.2rem; }
.ne-entry-content pre, .ne-entry-content code { font-family: "Source Code Pro", ui-monospace, monospace; }
.ne-entry-content pre { background: #06090d; border: 1px solid var(--ne-line); border-radius: 10px; overflow: auto; padding: 1rem; }
.ne-entry-content :not(pre) > code { background: var(--ne-surface-raised); border-radius: 4px; font-size: .9em; padding: .12em .32em; }
.ne-post-footer { border-top: 1px solid var(--ne-line); margin-top: 36px; padding-top: 22px; }
.ne-post-footer .tags-links a { background: var(--ne-surface-raised); border-radius: 5px; color: var(--ne-muted); display: inline-block; font-family: "Source Code Pro", ui-monospace, monospace; font-size: .76rem; margin: 0 .35rem .35rem 0; padding: .2rem .48rem; text-decoration: none; }
.ne-pagination { display: flex; gap: 8px; margin-top: 30px; }
.ne-pagination .page-numbers { background: var(--ne-surface); border: 1px solid var(--ne-line); border-radius: 7px; color: var(--ne-text); padding: .4rem .7rem; text-decoration: none; }
.ne-pagination .current { background: var(--ne-blue); color: #07151a; }

/* Rodapé */
.ne-footer { background: #06090d; border-top: 1px solid var(--ne-line); padding: 32px 0; }
.ne-footer__inner { align-items: center; color: var(--ne-muted); display: flex; font-size: .8rem; justify-content: space-between; }
.ne-footer__inner p { margin: 0; }
.ne-footer a { color: var(--ne-blue); }
.ne-footer__brand { display: block; line-height: 0; }
.ne-footer__brand img { height: auto; max-height: 37px; width: auto; }
.ne-back-to-top { align-items: center; background: linear-gradient(135deg, var(--ne-green), var(--ne-blue)); border-radius: 50%; bottom: 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); color: #061217; display: flex; font-size: 1.25rem; font-weight: 800; height: 43px; justify-content: center; opacity: 0; pointer-events: none; position: fixed; right: 22px; text-decoration: none; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease; width: 43px; z-index: 35; }
.ne-back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.ne-back-to-top:hover { color: #061217; transform: translateY(-3px); }

@media (max-width: 900px) {
  .ne-header__inner { min-height: 66px; }
  .ne-menu-toggle { display: grid; }
  .ne-nav { background: var(--ne-surface); border-top: 1px solid var(--ne-line); display: none; left: 0; padding: 16px 24px; position: absolute; right: 0; top: 66px; }
  .ne-nav.is-open { display: block; }
  .ne-menu { align-items: flex-start; flex-direction: column; gap: 14px; }
  .ne-menu li { width: 100%; }
  .ne-menu .sub-menu { box-shadow: none; display: none; margin: 8px 0 0 12px; min-width: 0; opacity: 1; padding: 0 0 0 12px; pointer-events: auto; position: static; transform: none; transition: none; visibility: visible; width: auto; }
  .ne-menu .menu-item-has-children.is-open > .sub-menu { display: grid; }
  .ne-featured { grid-template-columns: 1fr; }
  .ne-featured__rail { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .ne-post-grid { grid-template-columns: repeat(2, 1fr); }
  .ne-topic-grid { grid-template-columns: repeat(2, 1fr); }
  .ne-content-grid { grid-template-columns: 1fr; }
  .ne-sidebar { border-left: 0; border-top: 1px solid var(--ne-line); padding: 18px 0 0; }
  .ne-widget--sticky-ad { position: static; }
}
@media (max-width: 620px) {
  .ne-container { padding-inline: 17px; }
  .ne-status { padding-inline: 17px; }
  .ne-status__label { display: none; }
  .ne-featured__lead { min-height: 410px; }
  .ne-featured__content { padding: 23px; }
  .ne-featured__rail, .ne-post-grid, .ne-topic-grid { grid-template-columns: 1fr; }
  .ne-list-card { grid-template-columns: 1fr; }
  .ne-list-card__image, .ne-list-card__image img { height: 190px; }
  .ne-footer__inner { align-items: flex-start; flex-direction: column; gap: 12px; }
}
