/*
Theme Name: Browser Apps Directory
Theme URI: https://example.com/browser-apps-directory
Author: Codex
Description: A creative SEO-friendly WordPress theme for software and web app directories.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: browser-apps-directory
Tags: blog, one-column, two-columns, custom-logo, featured-images, full-width-template, responsive-layout
*/

:root {
  --bg: #000000;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f7f9;
  --surface-strong: #ffffff;
  --text: #0a0a0a;
  --muted: #4b5563;
  --border: rgba(10, 10, 10, 0.12);
  --primary: #0a0a0a;
  --primary-strong: #000000;
  --accent: #2563eb;
  --warning: #d97706;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
  --glow: 0 0 0 1px rgba(37, 99, 235, 0.08), 0 0 28px rgba(37, 99, 235, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --content-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.06), transparent 26%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.04), transparent 22%),
    linear-gradient(180deg, #000000 0%, #0b0b0b 100%);
  color: var(--text);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 92%);
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus {
  color: #111111;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 18px;
  z-index: 1000;
  padding: 12px 16px;
  background: #fff;
  color: #000;
  border-radius: 999px;
}

.skip-link:focus {
  left: 18px;
}

.site-header,
.site-footer,
.site-main,
.hero {
  width: min(100% - 32px, var(--content-width));
  margin: 0 auto;
}

.site-header {
  padding: 20px 0 0;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.site-title {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.2;
}

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

.site-description {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-logo img {
  display: block;
  max-height: 46px;
  width: auto;
}

.primary-nav ul,
.footer-nav ul,
.post-meta-list,
.software-meta-list,
.archive-stats,
.taxonomy-list,
.related-grid,
.post-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.primary-nav a {
  color: var(--text);
  font-weight: 600;
  opacity: 0.88;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a {
  color: #000;
  opacity: 1;
}

.hero {
  display: grid;
  gap: 22px;
  padding: 30px 0 16px;
}

.hero-panel,
.hero-card,
.post-card,
.entry-card,
.page-card,
.comments-area,
.comment-respond,
.software-panel,
.archive-intro,
.footer-shell,
.related-card {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow), var(--glow);
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.9;
}

.hero-panel::before {
  inset: -10% auto auto -8%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), transparent 65%);
}

.hero-panel::after {
  inset: auto -8% -18% auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), transparent 68%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: #111111;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-lead {
  position: relative;
  z-index: 1;
  max-width: 64ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.hero-chips,
.entry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-chip,
.entry-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-chip strong,
.entry-chip strong {
  color: var(--primary);
  font-weight: 900;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.button:focus {
  transform: translateY(-1px);
}

.button-primary {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.14);
}

.button-secondary {
  background: #ffffff;
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.hero-side {
  display: grid;
  gap: 16px;
}

.hero-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.hero-card .section-text,
.hero-card p {
  line-height: 1.6;
}

.hero-card h2,
.hero-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.hero-card p {
  margin: 0;
  color: var(--muted);
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
}

.search-form input[type="search"]::placeholder {
  color: #71829c;
}

.search-form button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-weight: 800;
}

.section {
  margin: 26px auto 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: -0.03em;
}

.section-text {
  margin: 6px 0 0;
  color: var(--muted);
}

.archive-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill,
.taxonomy-list a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
}

.post-grid,
.related-grid {
  display: grid;
  gap: 18px;
}

.post-card,
.entry-card,
.page-card,
.comments-area,
.comment-respond,
.software-panel,
.archive-intro {
  border-radius: var(--radius-xl);
}

.post-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--warning));
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.24);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18), var(--glow);
}

.post-card__media img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  display: block;
  filter: saturate(1.1) contrast(1.05);
}

.post-card__body {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.post-card__body::before {
  content: "dev tool";
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: #111111;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-card__meta a {
  color: #111111;
}

.post-card__meta a:hover {
  color: #000;
}

.post-card__title {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.25;
}

.post-card__title a {
  color: var(--text);
}

.post-card__title a:hover {
  color: #000000;
}

.post-card__excerpt {
  margin: 0;
  color: var(--muted);
  min-height: 4.8em;
}

.post-card__meta,
.entry-meta,
.post-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
}

.post-card__meta span,
.entry-meta span,
.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.post-card__footer {
  margin-top: auto;
  padding-top: 4px;
}

.site-main {
  display: grid;
  gap: 24px;
  padding: 18px 0 48px;
}

.archive-intro,
.page-card,
.entry-card,
.software-panel,
.comments-area,
.comment-respond {
  padding: 24px;
  background: #ffffff;
}

.archive-intro {
  position: relative;
  overflow: hidden;
}

.archive-intro::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), transparent 70%);
}

.archive-intro h1,
.page-title,
.entry-title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.archive-intro p,
.entry-content,
.page-content,
.software-panel p {
  color: var(--muted);
}

.archive-cats {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.entry-card {
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16), var(--glow);
}

.entry-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 30%),
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.04), transparent 28%);
  pointer-events: none;
}

.entry-card__hero {
  position: relative;
}

.entry-card__hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 64px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.92));
}

.entry-card__hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.entry-card__inner {
  padding: 24px;
  position: relative;
  z-index: 1;
}

.entry-card__grid {
  display: grid;
  gap: 18px;
}

.entry-card__main {
  min-width: 0;
}

.entry-card__rail {
  display: grid;
  gap: 16px;
}

.entry-hero-summary {
  margin: 16px 0 0;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.12);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(37, 99, 235, 0.03));
}

.entry-hero-summary code,
.terminal-snippet code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.terminal-snippet {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f8fafc;
  color: #111111;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.terminal-snippet p {
  margin: 0;
  color: inherit;
}

.terminal-snippet .muted {
  color: #4b5563;
}

.software-panel {
  display: none;
}

.software-meta-list {
  display: grid;
  gap: 12px;
}

.software-meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.software-meta-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.software-meta-label {
  color: var(--muted);
}

.software-meta-value {
  text-align: right;
  font-weight: 700;
}

.related-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-card {
  padding: 18px;
  border-radius: var(--radius-lg);
}

.related-card:hover {
  border-color: rgba(0, 0, 0, 0.22);
  transform: translateY(-3px);
  box-shadow: var(--shadow), var(--glow);
}

.related-card img {
  border-radius: 14px;
  border: 1px solid var(--border);
}

.related-card h3 {
  margin: 12px 0 0;
  font-size: 1rem;
  line-height: 1.35;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.page-content h2,
.page-content h3,
.page-content h4 {
  color: var(--text);
  line-height: 1.25;
}

.entry-content a,
.page-content a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.entry-content blockquote,
.page-content blockquote {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: #f8fafc;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.wp-block-table {
  overflow-x: auto;
}

.wp-block-image,
.wp-block-embed,
.wp-block-gallery {
  margin: 24px 0;
}

.pagination,
.wp-block-query-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.pagination .page-numbers,
.wp-block-query-pagination a,
.wp-block-query-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.pagination .current,
.wp-block-query-pagination .current {
  background: #000000;
  border-color: transparent;
  color: #ffffff;
}

.comments-area h2 {
  margin-top: 0;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-body {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.comment-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: #ffffff;
  color: var(--text);
}

.comment-form .form-submit input {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-weight: 800;
}

.site-footer {
  padding: 0 0 30px;
}

.footer-shell {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: #ffffff;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-info {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-info a {
  color: inherit;
  text-decoration: underline;
}

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

@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    align-items: stretch;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .software-panel {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    align-items: start;
  }

  .entry-card__grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    align-items: start;
  }

  .footer-shell {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .header-bar {
    padding-left: 26px;
    padding-right: 26px;
  }
}

@media (max-width: 719px) {
  .header-bar {
    border-radius: var(--radius-lg);
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header,
  .site-main,
  .site-footer,
  .hero {
    width: min(100% - 18px, var(--content-width));
  }

  .primary-nav ul {
    gap: 12px;
  }

  .hero-panel {
    padding: 24px;
  }

  .archive-intro,
  .page-card,
  .entry-card,
  .software-panel,
  .comments-area,
  .comment-respond,
  .footer-shell {
    border-radius: var(--radius-lg);
    padding: 18px;
  }

  .section-head,
  .footer-top,
  .software-meta-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .software-meta-value {
    text-align: left;
  }

  .hero-actions,
  .search-form {
    flex-direction: column;
  }
}
