/*
Theme Name: piracysim
Author: Camden Vale Studio
Description: A classic PHP WordPress publishing theme inspired by modern SaaS landing-page structure, with dynamic category navigation, latest-post thumbnail hero, editable colors, editable intro text, and dense homepage modules.
Version: 2.0.6
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: psm-theme
*/

:root {
  --psm-bg: #070b16;
  --psm-panel: #0d1324;
  --psm-text: #f7fbff;
  --psm-muted: #a7b0c2;
  --psm-accent: #98ff5f;
  --psm-accent-two: #69d2ff;
  --psm-border: rgba(255, 255, 255, 0.12);
  --psm-border-strong: rgba(255, 255, 255, 0.22);
  --psm-card: rgba(255, 255, 255, 0.065);
  --psm-card-strong: rgba(255, 255, 255, 0.1);
  --psm-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --psm-container: 1180px;
  --psm-single: 980px;
  --psm-radius: 28px;
  --psm-radius-sm: 16px;
  --psm-font-main: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--psm-text);
  background:
    radial-gradient(circle at 16% 0%, rgba(105, 210, 255, 0.18), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(152, 255, 95, 0.14), transparent 30%),
    var(--psm-bg);
  font-family: var(--psm-font-main);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
canvas,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  color: var(--psm-accent);
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--psm-accent-two);
  outline-offset: 3px;
}

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

.psm-skip-link:focus {
  z-index: 1000;
  top: 14px;
  left: 14px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  margin: 0;
  clip: auto;
  color: #071016;
  background: var(--psm-accent);
  border-radius: 999px;
}

.psm-container {
  width: min(var(--psm-container), calc(100% - 32px));
  margin: 0 auto;
}

.psm-main {
  min-height: 70vh;
}

.psm-header {
  position: sticky;
  z-index: 80;
  top: 12px;
  padding: 12px 16px 0;
}

.psm-view-admin .psm-header {
  top: 46px;
}

.psm-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--psm-container), 100%);
  min-height: 66px;
  margin: 0 auto;
  padding: 10px;
  background: rgba(7, 11, 22, 0.76);
  border: 1px solid var(--psm-border);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.psm-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--psm-text);
  text-decoration: none;
}

.psm-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: #071016;
  background: var(--psm-accent);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 950;
}

.psm-brand-logo {
  width: auto;
  max-width: 154px;
  max-height: 48px;
  object-fit: contain;
}

.psm-brand-text {
  display: grid;
  min-width: 0;
}

.psm-brand-name {
  overflow: hidden;
  color: var(--psm-text);
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psm-brand-description {
  display: none;
  overflow: hidden;
  max-width: 190px;
  color: var(--psm-muted);
  font-size: 0.76rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psm-menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #071016;
  background: var(--psm-accent);
  border: 0;
  border-radius: 999px;
}

.psm-menu-toggle-bars,
.psm-menu-toggle-bars::before,
.psm-menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.psm-menu-toggle-bars {
  position: relative;
}

.psm-menu-toggle-bars::before,
.psm-menu-toggle-bars::after {
  position: absolute;
  left: 0;
  content: "";
}

.psm-menu-toggle-bars::before {
  top: -6px;
}

.psm-menu-toggle-bars::after {
  top: 6px;
}

.psm-header.psm-menu-open .psm-menu-toggle-bars {
  transform: rotate(45deg);
}

.psm-header.psm-menu-open .psm-menu-toggle-bars::before {
  transform: translateY(6px) rotate(90deg);
}

.psm-header.psm-menu-open .psm-menu-toggle-bars::after {
  opacity: 0;
}

.psm-navigation {
  position: absolute;
  z-index: 90;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  max-height: 0;
  overflow: hidden;
  background: rgba(7, 11, 22, 0.98);
  border: 0 solid transparent;
  border-radius: 28px;
  box-shadow: var(--psm-shadow);
  transition: max-height 220ms ease, border-color 220ms ease;
}

.psm-header.psm-menu-open .psm-navigation {
  max-height: 72vh;
  overflow-y: auto;
  border: 1px solid var(--psm-border);
}

.psm-menu-list,
.psm-footer-menu {
  padding: 0;
  margin: 0;
  list-style: none;
}

.psm-menu-list {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.psm-menu-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 14px;
  color: var(--psm-muted);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.psm-menu-link:hover,
.psm-menu-link:focus-visible,
.psm-menu-item-current > .psm-menu-link {
  color: #071016;
  background: var(--psm-accent);
}

.psm-navigation .psm-menu-item:nth-child(n+6) {
  display: none;
}

.psm-hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  border-bottom: 1px solid var(--psm-border);
}

.psm-hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.25), rgba(11, 16, 32, 0.25)),
    url("assets/images/psm-default-banner.jpg") center / cover no-repeat;
  background-color: #070b16;
}

.psm-hero-image,
.psm-hero-image-empty {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.psm-hero-image-empty,
.psm-card-image-empty {
  display: block;
  background:
    radial-gradient(circle at 24% 24%, rgba(152, 255, 95, 0.32), transparent 24%),
    radial-gradient(circle at 72% 28%, rgba(105, 210, 255, 0.26), transparent 28%),
    linear-gradient(135deg, #111827, #070b16);
}

.psm-hero-scrim {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 11, 22, 0.9) 0%, rgba(7, 11, 22, 0.72) 34%, rgba(7, 11, 22, 0.24) 70%, rgba(7, 11, 22, 0.08) 100%),
    linear-gradient(180deg, rgba(7, 11, 22, 0.08) 0%, rgba(7, 11, 22, 0.78) 100%);
}

.psm-hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 760px;
  align-items: end;
  gap: 28px;
  padding-top: 128px;
  padding-bottom: 48px;
}

.psm-hero-copy {
  max-width: 760px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.psm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--psm-accent);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.psm-kicker::before {
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  content: "";
}

.psm-hero-title,
.psm-section-title,
.psm-archive-title,
.psm-single-title {
  margin: 0;
  color: var(--psm-text);
  font-family: var(--psm-font-main);
  font-size: 3.3rem;
  font-weight: 850;
  line-height: 0.94;
  letter-spacing: 0;
}

.psm-hero-title {
  max-width: 12ch;
  font-size: clamp(3.3rem, 12vw, 7.4rem);
}

.psm-hero-text,
.psm-section-text {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--psm-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.psm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.psm-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 850;
  text-decoration: none;
}

.psm-button-primary {
  color: #071016;
  background: var(--psm-accent);
  box-shadow: 0 16px 38px rgba(152, 255, 95, 0.2);
}

.psm-button-secondary {
  color: var(--psm-text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--psm-border);
}

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

.psm-hero-feature {
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
  padding: 18px;
  color: var(--psm-text);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--psm-border);
  border-radius: 22px;
  text-decoration: none;
  backdrop-filter: blur(14px);
}

.psm-feature-label {
  color: var(--psm-accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.psm-hero-feature strong {
  font-size: 1.06rem;
  line-height: 1.25;
}

.psm-hero-feature span:last-child {
  color: var(--psm-muted);
  font-size: 0.88rem;
}

.psm-icon-row,
.psm-metrics,
.psm-system,
.psm-showcase,
.psm-latest,
.psm-flex-section,
.psm-archive,
.psm-single-main {
  padding: 58px 0;
}

.psm-icon-grid {
  display: grid;
  gap: 12px;
}

.psm-mini-icon {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 20px;
  color: var(--psm-text);
  background: var(--psm-card);
  border: 1px solid var(--psm-border);
  border-radius: 24px;
  font-weight: 850;
  text-align: center;
}

.psm-mini-symbol {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--psm-accent), var(--psm-accent-two));
  border-radius: 18px;
}

.psm-mini-symbol::before {
  width: 22px;
  height: 22px;
  background: #071016;
  content: "";
}

.psm-mini-symbol-one::before {
  border-radius: 50%;
}

.psm-mini-symbol-two::before {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.psm-mini-symbol-three::before {
  border-radius: 5px;
  transform: rotate(45deg);
}

.psm-mini-symbol-four::before {
  width: 26px;
  height: 14px;
  border-radius: 999px;
}

.psm-metrics-grid {
  display: grid;
  overflow: hidden;
  background: var(--psm-card);
  border: 1px solid var(--psm-border);
  border-radius: var(--psm-radius);
}

.psm-metric {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-bottom: 1px solid var(--psm-border);
}

.psm-metric:last-child {
  border-bottom: 0;
}

.psm-metric strong {
  color: var(--psm-accent);
  font-size: 3rem;
  font-weight: 950;
  line-height: 1;
}

.psm-metric span {
  color: var(--psm-muted);
}

.psm-system-grid {
  display: grid;
  gap: 24px;
  align-items: start;
}

.psm-section-heading,
.psm-archive-header {
  max-width: 780px;
  margin-bottom: 28px;
}

.psm-section-title,
.psm-archive-title {
  font-size: clamp(2.3rem, 7vw, 5rem);
}

.psm-system-cards {
  display: grid;
  gap: 14px;
}

.psm-system-card,
.psm-card,
.psm-showcase-card,
.psm-widget,
.psm-empty-state,
.psm-single-nav-link {
  background: var(--psm-card);
  border: 1px solid var(--psm-border);
  border-radius: var(--psm-radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.psm-system-card {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.psm-system-card span {
  color: var(--psm-accent-two);
  font-size: 0.82rem;
  font-weight: 900;
}

.psm-system-card h3,
.psm-showcase-card h3,
.psm-card-title,
.psm-widget-title,
.psm-empty-state h2 {
  margin: 0;
  color: var(--psm-text);
  font-size: 1.42rem;
  line-height: 1.15;
}

.psm-system-card p,
.psm-showcase-body time,
.psm-card-excerpt,
.psm-empty-state p {
  margin: 0;
  color: var(--psm-muted);
}

.psm-showcase-grid,
.psm-card-grid,
.psm-flex-grid {
  display: grid;
  gap: 18px;
}

.psm-showcase-card,
.psm-card {
  overflow: hidden;
}

.psm-showcase-media,
.psm-card-media {
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  aspect-ratio: 16 / 11;
}

.psm-showcase-image,
.psm-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.psm-showcase-card:hover .psm-showcase-image,
.psm-card:hover .psm-card-image {
  transform: scale(1.035);
}

.psm-showcase-body,
.psm-card-body {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.psm-showcase-card h3 a,
.psm-card-title a {
  text-decoration: none;
}

.psm-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--psm-muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.psm-meta-dot {
  width: 5px;
  height: 5px;
  background: var(--psm-accent);
  border-radius: 50%;
}

.psm-post-category {
  color: var(--psm-accent);
  text-decoration: none;
}

.psm-empty-state,
.psm-widget {
  padding: 24px;
}

.psm-posts-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.psm-posts-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 16px;
  color: #071016;
  background: var(--psm-accent);
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
}

.psm-single-shell {
  width: min(80vw, var(--psm-single));
  margin: 0 auto;
}

.psm-back-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  margin-bottom: 28px;
  color: var(--psm-accent);
  font-weight: 850;
  text-decoration: none;
}

.psm-back-link::before {
  margin-right: 8px;
  content: "<-";
}

.psm-single-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--psm-border);
}

.psm-single-title {
  max-width: 900px;
  margin-top: 14px;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
}

.psm-single-excerpt {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--psm-muted);
  font-size: 1.08rem;
}

.psm-single-content {
  padding-top: 34px;
  color: rgba(247, 251, 255, 0.84);
  font-size: 1.05rem;
}

.psm-single-content > *:first-child {
  margin-top: 0;
}

.psm-single-content h2,
.psm-single-content h3,
.psm-single-content h4 {
  color: var(--psm-text);
  line-height: 1.15;
}

.psm-single-content a {
  color: var(--psm-accent);
  font-weight: 800;
}

.psm-single-content img {
  border-radius: var(--psm-radius-sm);
}

.psm-single-content blockquote {
  margin: 28px 0;
  padding: 22px;
  color: var(--psm-text);
  background: var(--psm-card);
  border-left: 4px solid var(--psm-accent);
  border-radius: var(--psm-radius-sm);
}

.psm-single-footer {
  display: grid;
  gap: 10px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--psm-border);
}

.psm-single-footer-label,
.psm-single-nav-link span {
  color: var(--psm-accent);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.psm-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.psm-tag-list a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 12px;
  color: var(--psm-text);
  background: var(--psm-card-strong);
  border: 1px solid var(--psm-border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.psm-single-nav {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.psm-single-nav-link {
  display: grid;
  gap: 6px;
  padding: 18px;
  text-decoration: none;
}

.psm-single-nav-link-next {
  text-align: left;
}

.psm-footer {
  padding-top: 64px;
  color: var(--psm-text);
  background: #050814;
  border-top: 1px solid var(--psm-border);
}

.psm-footer-grid {
  display: grid;
  gap: 28px;
  padding-bottom: 36px;
}

.psm-footer-brand {
  margin: 0 0 10px;
  color: var(--psm-text);
  font-size: 1.8rem;
  font-weight: 950;
  line-height: 1;
}

.psm-footer p,
.psm-footer a {
  color: var(--psm-muted);
}

.psm-footer h2 {
  margin: 0 0 12px;
  color: var(--psm-text);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.psm-footer .psm-menu-list,
.psm-footer-menu {
  display: grid;
  gap: 8px;
  padding: 0;
}

.psm-footer .psm-menu-link,
.psm-footer-menu .psm-menu-link {
  min-height: auto;
  padding: 0;
  color: var(--psm-muted);
  background: transparent;
}

.psm-footer-bottom {
  padding: 22px 0 28px;
  border-top: 1px solid var(--psm-border);
  color: var(--psm-muted);
  font-size: 0.9rem;
}

.psm-footer-bottom p {
  margin: 0;
}

@media (min-width: 560px) {
  .psm-brand-description {
    display: block;
  }

  .psm-icon-grid,
  .psm-metrics-grid,
  .psm-showcase-grid,
  .psm-card-grid,
  .psm-flex-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .psm-single-nav-link-next {
    text-align: right;
  }
}

@media (min-width: 860px) {
  .psm-view-admin .psm-header {
    top: 44px;
  }

  .psm-menu-toggle {
    display: none;
  }

  .psm-navigation {
    position: static;
    max-height: none;
    overflow: visible;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .psm-navigation .psm-menu-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
    max-width: 760px;
    padding: 0;
  }

  .psm-navigation .psm-menu-link {
    min-height: 42px;
    padding: 9px 13px;
  }

  .psm-hero-content {
    grid-template-columns: minmax(0, 760px);
    align-items: end;
  }

  .psm-hero-copy {
    padding: 0;
  }

  .psm-system-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  }

  .psm-icon-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .psm-metrics-grid,
  .psm-showcase-grid,
  .psm-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .psm-card-grid .psm-card:first-child {
    grid-column: span 2;
  }

  .psm-footer-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.7fr) minmax(220px, 0.7fr);
  }

  .psm-footer-flex,
  .psm-footer-nav {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1080px) {
  .psm-header {
    padding-right: 24px;
    padding-left: 24px;
  }

  .psm-hero {
    min-height: 820px;
  }

  .psm-hero-content {
    min-height: 820px;
    padding-top: 150px;
    padding-bottom: 62px;
  }
}
