/*
Theme Name: PS Agency
Theme URI: https://www.pstheagency.co.uk/
Author: PS the Agency
Description: Listing and article layouts from the PS site. WordPress is installed in /blog.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: ps-agency
*/

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0f0e0c;
  color: #ffffff;
  font-family: 'League Spartan', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(39, 160, 187, 0.09), transparent 60%);
  pointer-events: none;
}

.blog-wrap,
.post-wrap,
.author-wrap {
  position: relative;
  margin: 0 auto;
}

.blog-wrap,
.author-wrap {
  max-width: 1080px;
  padding: clamp(88px, 12vh, 130px) clamp(24px, 5vw, 72px) 160px;
}

.post-wrap {
  max-width: 760px;
  padding: clamp(88px, 12vh, 130px) clamp(24px, 5vw, 72px) 140px;
}

.blog-eyebrow,
.author-eyebrow,
.post-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #ff2e85;
  margin-bottom: 14px;
}

.blog-wrap h1,
.author-wrap h1 {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 18px;
}

.author-wrap h1 { margin-bottom: 0; }

.blog-sub {
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(1rem, 1.55vw, 1.25rem);
  max-width: 560px;
  margin-bottom: clamp(44px, 7vh, 72px);
}

.post-grid,
.a-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.post-card,
.a-card {
  display: flex;
  flex-direction: column;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  transition: border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover,
.a-card:hover {
  border-color: rgba(39, 160, 187, 0.6);
  box-shadow: 0 0 34px rgba(39, 160, 187, 0.18);
  transform: translateY(-3px);
}

.post-card__media,
.a-card__media {
  aspect-ratio: 16 / 9;
  background: rgba(39, 160, 187, 0.06);
  overflow: hidden;
}

.post-card__media img,
.a-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover .post-card__media img,
.a-card:hover .a-card__media img { transform: scale(1.04); }

.post-card__body,
.a-card__body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.post-card__date,
.a-card__date {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #27a0bb;
}

.post-card__title,
.a-card__title {
  font-size: clamp(1.28rem, 2.6vw, 1.52rem);
  font-weight: 700;
  line-height: 1.15;
}

.post-card__excerpt,
.a-card__excerpt {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  line-height: 1.55;
  flex: 1;
}

.post-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-card__author img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(39, 160, 187, 0.5);
}

.blog-status,
.author-none {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 60px 0;
  text-align: center;
}

.post-wrap h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 20px;
}

.post-meta {
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.post-meta a,
.author-email {
  color: #27a0bb;
  text-decoration: none;
  border-bottom: 1px solid rgba(39, 160, 187, 0.35);
  padding-bottom: 1px;
}

.post-meta a:hover,
.author-email:hover {
  border-color: #27a0bb;
}

.post-hero { margin: 0 0 44px; }

.post-hero img,
.post-body img,
.post-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.post-body {
  font-size: clamp(1rem, 1.55vw, 1.25rem);
  line-height: 1.65;
}

.post-body p,
.post-body ul,
.post-body ol { margin-bottom: 1.1em; }

.post-body h2,
.post-body h3,
.post-body h4 {
  font-weight: 800;
  margin: 1.4em 0 0.5em;
  line-height: 1.15;
}

.post-body h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.post-body h3 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); }
.post-body a { color: #27a0bb; text-underline-offset: 3px; }
.post-body ul,
.post-body ol { padding-left: 1.3em; }
.post-body li { margin-bottom: 0.4em; }

.post-body blockquote {
  border-left: 2px solid #27a0bb;
  padding: 4px 0 4px 20px;
  color: rgba(255, 255, 255, 0.75);
  margin: 1.4em 0;
}

.post-body figure,
.post-body .wp-block-image,
.post-body .wp-block-embed { margin: 36px 0; }

.post-body figcaption,
.post-body .wp-element-caption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.06em;
}

.post-body .wp-block-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 18px;
}

.author-card {
  background: rgba(17, 17, 17, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: clamp(44px, 7vh, 64px);
}

.author-head {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 36px);
}

.author-avatar {
  width: clamp(96px, 14vw, 140px);
  height: clamp(96px, 14vw, 140px);
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(39, 160, 187, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(39, 160, 187, 0.08);
}

.author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.author-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 8px;
}

.author-email { display: inline-block; margin-top: 10px; font-size: clamp(0.85rem, 1.3vw, 1rem); font-weight: 600; letter-spacing: 0.08em; }

.author-bio {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  line-height: 1.65;
}

.author-posts__heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 22px;
}

.post-nav,
.author-nav {
  margin-top: 64px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.home-link,
.post-nav a,
.post-nav .page-numbers,
.author-nav a {
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid rgba(39, 160, 187, 0.55);
  border-radius: 100px;
  padding: 13px 26px 11px;
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-link { margin-top: 64px; }

.home-link:hover,
.post-nav a:hover,
.author-nav a:hover {
  background: rgba(39, 160, 187, 0.14);
  box-shadow: 0 0 26px rgba(39, 160, 187, 0.5);
}

.post-nav .page-numbers.current {
  color: #27a0bb;
  border-color: #27a0bb;
}

@media (max-width: 560px) {
  .author-head { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card,
  .a-card,
  .post-card__media img,
  .a-card__media img,
  .home-link,
  .post-nav a,
  .author-nav a { transition: none; }
}
