/*
Theme Name: TREN v3 Blog
Theme URI: https://www.trenstudio.com/
Author: TREN Studio
Description: Premium Dark Mode Editorial Style WordPress blog skin matching the main SPA.
Version: 0.3.0
Text Domain: tren-v3-blog
*/

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=DM+Sans:opsz,wght@9..40,300..600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --brand-charcoal: #1d1f24;
  --brand-graphite: #111317;
  --brand-grid: #3b3d41;
  --brand-metal: #bfc0bb;
  --brand-ivory: #dbdbd6;
  --void: #111317;
  --ink: #1d1f24;
  --lift: #24272b;
  --raise: #30343a;
  --l0: rgba(219,219,214,0.07);
  --l1: rgba(219,219,214,0.13);
  --l2: rgba(219,219,214,0.22);
  --l3: rgba(219,219,214,0.42);
  --w0: #e7e5dc;
  --w1: #9fa09d;
  --w2: #53575b;
  --forge: #e9e4d6;
  --sema: #d6d1c5;
  --post: #b7bec0;
  --f-display: 'Bricolage Grotesque', sans-serif;
  --f-body: 'DM Sans', sans-serif;
  --f-mono: 'IBM Plex Mono', monospace;
  --glass-bg: rgba(29, 31, 36, 0.7);
  --glass-border: rgba(219,219,214,0.13);
}

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

html {
  background: var(--void);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--w0);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .022;
  pointer-events: none;
  z-index: 9998;
}

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

.tren-nav {
  align-items: center;
  backdrop-filter: blur(28px) saturate(180%);
  background: rgba(17,19,23,.9);
  border-bottom: 1px solid var(--l0);
  display: flex;
  height: 64px;
  justify-content: space-between;
  left: 0;
  padding: 0 56px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

.nlogo {
  align-items: center;
  display: flex;
  gap: 10px;
}

.nmark {
  align-items: center;
  background: #f0ede5;
  border-radius: 9px;
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(255,255,255,.08),inset 0 0 0 1px rgba(255,255,255,.45);
}

.nmark img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.nmark svg {
  height: 16px;
  width: 16px;
}

.nlogo:hover .nmark {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(255,255,255,.11),0 0 28px rgba(219,219,214,.14),inset 0 0 0 1px rgba(255,255,255,.5);
}

.ntitle {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--w0);
}

.ntitle span {
  font-size: 12px;
  font-weight: 400;
  margin-left: 3px;
  opacity: .35;
}

.nlinks {
  display: flex;
  gap: 2px;
}

.nlink {
  border-radius: 8px;
  color: var(--w1);
  font-size: 13px;
  padding: 8px 14px;
  transition: all .2s;
  font-weight: 400;
}

.nlink:hover,
.nlink.is-active {
  background: var(--l0);
  color: var(--w0);
}

.nright {
  align-items: center;
  display: flex;
  gap: 8px;
}

.nbtn,
.btn {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 500;
  gap: 9px;
  padding: 13px 28px;
  transition: all .25s;
}

.nbtn {
  border-radius: 9px;
  font-size: 13px;
  padding: 8px 18px;
}

.nbtn-g,
.btn-ghost {
  background: transparent;
  border: 1px solid var(--l1);
  color: var(--w0);
}

.nbtn-g:hover,
.btn-ghost:hover {
  background: var(--l0);
  border-color: var(--l2);
}

.nbtn-w,
.btn-forge {
  background: var(--w0);
  border: 1px solid var(--w0);
  color: var(--void);
}

.btn-forge:hover {
  background: #cfcfc8;
}

.blog-shell {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.hero-grid {
  background-image: linear-gradient(var(--l0) 1px, transparent 1px), linear-gradient(90deg, var(--l0) 1px, transparent 1px);
  background-size: 64px 64px;
  inset: 0;
  mask-image: radial-gradient(ellipse 100% 90% at 50% 0%, black 40%, transparent 100%);
  position: absolute;
}

.blog-hero {
  border-bottom: 1px solid var(--l0);
  min-height: 60vh;
  overflow: hidden;
  padding: 160px 56px 86px;
  position: relative;
  background: var(--void);
}

.blog-hero::after {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(219,219,214,.055) 0%, transparent 70%);
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.wrap {
  margin: 0 auto;
  max-width: 1280px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  align-items: center;
  color: var(--w1);
  display: flex;
  font-family: var(--f-mono);
  font-size: 10px;
  gap: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.eyebrow::before {
  background: currentColor;
  content: '';
  display: block;
  height: 1px;
  width: 16px;
}

.blog-title {
  font-family: var(--f-display);
  font-size: clamp(48px, 7vw, 100px);
  font-weight: 800;
  letter-spacing: -3.5px;
  line-height: .9;
  margin: 24px 0 28px;
  color: var(--w0);
}

.blog-title .hl {
  background: linear-gradient(135deg, var(--brand-ivory) 0%, rgba(219,219,214,.58) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-title .fade {
  color: rgba(219,219,214,.14);
}

.blog-lead {
  color: var(--w1);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.85;
  margin: 0;
  max-width: 600px;
}

.section {
  padding: 96px 56px;
}

.posts-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  background: var(--l0);
  border: 1px solid var(--l0);
}

.post-card {
  background: var(--void);
  display: flex;
  flex-direction: column;
  min-height: 400px;
  padding: 44px;
  transition: background .25s, transform .25s;
  position: relative;
  overflow: hidden;
}

.post-card:hover {
  background: var(--lift);
}

.post-image-glass {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
  background: #070a10;
}

.post-image-glass img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
  filter: saturate(0.9) contrast(1.1);
}

.post-card:hover .post-image-glass img {
  transform: scale(1.05);
}

.post-image-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
  border-radius: 12px;
  pointer-events: none;
}

.tag {
  align-items: center;
  border: 1px solid rgba(233,228,214,.25);
  border-radius: 100px;
  color: var(--w0);
  background: rgba(233,228,214,.10);
  display: inline-flex;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 500;
  gap: 5px;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  text-transform: uppercase;
  width: max-content;
  margin-bottom: 16px;
}

.post-card h2 {
  font-family: var(--f-display);
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -1.4px;
  line-height: 1;
  margin: 0 0 16px;
  color: var(--w0);
}

.post-card p {
  color: var(--w1);
  font-size: 15px;
  margin: 0 0 28px;
  line-height: 1.75;
  flex-grow: 1;
}

.post-meta {
  color: var(--w2);
  display: flex;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 10px;
  gap: 18px;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-top: auto;
}

.empty-state {
  background: var(--ink);
  border: 1px solid var(--l0);
  border-radius: 14px;
  padding: 48px;
}

.empty-state .eyebrow {
  margin-bottom: 16px;
}

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

.article-shell {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  border: 1px solid var(--l0);
  border-radius: 18px;
  margin-top: 36px;
  padding: clamp(30px, 6vw, 70px);
}

.article-shell h1 {
  font-family: var(--f-display);
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 800;
  letter-spacing: -3px;
  line-height: .94;
  margin: 22px 0 24px;
  color: var(--w0);
}

.article-content {
  color: rgba(240,240,255,.86);
  font-size: 18px;
  line-height: 1.9;
  font-weight: 300;
}

.article-content h2,
.article-content h3 {
  color: var(--w0);
  font-family: var(--f-display);
  letter-spacing: -1px;
  line-height: 1.05;
  margin: 48px 0 14px;
  font-weight: 800;
}

.article-content p {
  color: rgba(240,240,255,.76);
  margin: 0 0 24px;
}

.article-content a {
  color: #73e7f3;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(115,231,243,.62);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
  transition: color .2s, text-decoration-color .2s;
}

.article-content a:hover {
  color: #f0ede5;
  text-decoration-color: #f0ede5;
}

.article-content .pgpaff-cta-btn,
.article-content .btn {
  text-decoration: none;
}

.article-content figure {
  margin: 40px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--l0);
}

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

.article-footer {
  border-top: 1px solid var(--l0);
  display: flex;
  gap: 12px;
  margin-top: 48px;
  padding-top: 28px;
}

.tren-footer {
  align-items: center;
  border-top: 1px solid var(--l0);
  background: var(--void);
  color: var(--w2);
  display: flex;
  font-family: var(--f-mono);
  font-size: 11px;
  justify-content: space-between;
  letter-spacing: 1px;
  padding: 40px 56px;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}

.reveal.vis {
  opacity: 1;
  transform: translateY(0);
}

.featured-image-wrap {
  width: 100%;
  margin: 28px 0 32px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--l0);
  background: var(--ink);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  position: relative;
}

.featured-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.featured-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  border-radius: 14px;
  pointer-events: none;
}

@media (max-width: 900px) {
  .tren-nav,
  .blog-hero,
  .section,
  .tren-footer {
    padding-left: 22px;
    padding-right: 22px;
  }

  .nlinks {
    display: none;
  }

  .nright {
    display: none;
  }

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

  .blog-title {
    letter-spacing: -2.5px;
  }

  .post-card {
    min-width: 0;
    padding: 28px 22px;
  }

  .post-image-glass {
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .post-card h2 {
    font-size: clamp(24px, 8vw, 31px);
  }
}

@media (max-width: 520px) {
  .tren-nav {
    height: 62px;
  }

  .blog-hero {
    padding-top: 122px;
  }

  .blog-title {
    font-size: clamp(36px, 10vw, 40px);
    letter-spacing: -1px;
    max-width: 320px;
  }

  .blog-lead {
    font-size: 15px;
    line-height: 1.75;
    max-width: 320px;
  }

  .article-shell {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding-left: 22px;
    padding-right: 22px;
  }
}
