/* ============================================================
   ATG: Posts  -  Blog Site Design System
   Target: ATG-Posts.Netlify.app
   Palette: #f80040 | #00c3c9 | #000 | #2f2f2f | #161922 | #202020
   ============================================================ */

:root {
  --red: #f80040;
  --cyan: #00c3c9;
  --black: #000000;
  --dark: #2f2f2f;
  --heading: #161922;
  --body-text: #202020;
  --white: #ffffff;
  --bg: #0d0f14;
  --bg2: #14171f;
  --bg3: #1a1d26;
  --border: rgba(248, 0, 64, 0.18);
  --glow-red: 0 0 24px rgba(248, 0, 64, 0.45);
  --glow-cyan: 0 0 24px rgba(0, 195, 201, 0.35);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  --max-w: 1200px;
  --prose-w: 760px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  color: #aab0bf;
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--red);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--cyan);
}
ul {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
}
h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}
h4 {
  font-size: 1.2rem;
}
p {
  color: #aab0bf;
  line-height: 1.75;
}

.accent {
  color: var(--red);
}
.accent-cyan {
  color: var(--cyan);
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.02em;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.prose-container {
  width: 100%;
  max-width: var(--prose-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
section {
  padding: 5rem 0;
}

/* ---- Navbar ---- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(248, 0, 64, 0.12);
  display: flex;
  align-items: center;
  transition: background var(--transition);
}
#navbar.scrolled {
  background: rgba(0, 0, 0, 0.97);
  border-bottom-color: var(--border);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
}
.nav-logo:hover {
  color: var(--white);
}
.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--red);
}
.nav-logo span {
  background: linear-gradient(135deg, var(--red), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: #aab0bf;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--red);
}

.nav-main-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--white) !important;
  padding: 0.45rem 1.1rem !important;
  border-radius: var(--radius) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  font-weight: 600 !important;
  transition: all var(--transition) !important;
}
.nav-main-btn:hover {
  border-color: rgba(0, 195, 201, 0.4) !important;
  color: var(--cyan) !important;
  background: rgba(0, 195, 201, 0.06) !important;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(16px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.nav-mobile.open {
  display: flex;
}
.nav-mobile a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-mobile a:hover {
  color: var(--red);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  section {
    padding: 3rem 0;
  }
}

/* ---- Page Header ---- */
.page-header {
  padding: 9rem 0 4rem;
  text-align: center;
  background:
    radial-gradient(
      ellipse at center,
      rgba(248, 0, 64, 0.06) 0%,
      transparent 70%
    ),
    var(--bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(248, 0, 64, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 0, 64, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.page-header p {
  color: #7a8494;
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 1.05rem;
}
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #7a8494;
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: var(--red);
}
.breadcrumb span {
  color: #3a4050;
}

/* ---- Divider ---- */
.divider {
  width: 60px;
  height: 3px;
  background: var(--red);
  margin: 1rem auto;
  border-radius: 2px;
}
.divider-left {
  margin-left: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover {
  background: #d4003a;
  box-shadow: var(--glow-red);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 195, 201, 0.4);
  color: var(--cyan);
  transform: translateY(-2px);
}

/* ---- Post Cards ---- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: var(--bg2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}
.post-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 0, 64, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.post-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg3);
  transition: opacity var(--transition);
}
.post-card:hover .post-card-img {
  opacity: 0.9;
}

.post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #7a8494;
  margin-bottom: 0.75rem;
}
.post-tag {
  background: rgba(248, 0, 64, 0.12);
  color: var(--red);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.post-card-body h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.post-card-body h2 a {
  color: var(--white);
}
.post-card-body h2 a:hover {
  color: var(--cyan);
}
.post-card-body p {
  font-size: 0.88rem;
  color: #7a8494;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red);
  align-self: flex-start;
}
.post-read-more:hover {
  color: var(--cyan);
  gap: 0.7rem;
}
.post-read-more::after {
  content: "→";
}

/* ---- Featured Post ---- */
.post-featured {
  background: var(--bg2);
  border: 1px solid rgba(248, 0, 64, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 3rem;
  transition: border-color var(--transition);
}
.post-featured:hover {
  border-color: rgba(248, 0, 64, 0.4);
}
.post-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}
.post-featured-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(248, 0, 64, 0.12);
  border: 1px solid rgba(248, 0, 64, 0.3);
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.post-featured-body h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.post-featured-body h2 a {
  color: var(--white);
}
.post-featured-body h2 a:hover {
  color: var(--cyan);
}
.post-featured-body p {
  color: #7a8494;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .post-featured {
    grid-template-columns: 1fr;
  }
  .post-featured-img {
    min-height: 200px;
  }
}

/* ---- Article / Prose ---- */
.article-header {
  padding: 8rem 0 3rem;
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.article-header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  z-index: 0;
}
.article-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 15, 20, 0.3),
    rgba(13, 15, 20, 0.95)
  );
  z-index: 1;
}
.article-header-content {
  position: relative;
  z-index: 2;
}
.article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.article-tag {
  background: rgba(248, 0, 64, 0.12);
  color: var(--red);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.article-title {
  color: var(--white);
  margin-bottom: 1.25rem;
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: #7a8494;
  font-size: 0.85rem;
}
.article-meta-bar span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Prose content */
.prose {
  padding: 4rem 0 5rem;
  background: var(--bg);
}
.prose-content {
  color: #c5ccd8;
  font-size: 1.05rem;
  line-height: 1.85;
}
.prose-content h1,
.prose-content h2,
.prose-content h3,
.prose-content h4,
.prose-content h5,
.prose-content h6 {
  color: var(--white);
  margin: 2.5rem 0 1rem;
}
.prose-content h1 {
  font-size: 2rem;
}
.prose-content h2 {
  font-size: 1.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.prose-content h3 {
  font-size: 1.3rem;
  color: var(--cyan);
}
.prose-content h4 {
  color: var(--red);
}
.prose-content p {
  margin-bottom: 1.5rem;
}
.prose-content a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(0, 195, 201, 0.3);
}
.prose-content a:hover {
  color: var(--red);
  border-bottom-color: rgba(248, 0, 64, 0.4);
}
.prose-content ul,
.prose-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.prose-content ul {
  list-style: none;
}
.prose-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: #c5ccd8;
}
.prose-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.prose-content ol {
  list-style: decimal;
}
.prose-content ol li {
  margin-bottom: 0.5rem;
  color: #c5ccd8;
  padding-left: 0.25rem;
}
.prose-content strong {
  color: var(--white);
  font-weight: 700;
}
.prose-content em {
  color: #c5ccd8;
}
.prose-content blockquote {
  border-left: 3px solid var(--red);
  padding: 1rem 1.5rem;
  background: rgba(248, 0, 64, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
  color: #aab0bf;
  font-style: italic;
}
.prose-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0, 195, 201, 0.08);
  color: var(--cyan);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}
.prose-content pre {
  background: var(--bg2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #c5ccd8;
}
.prose-content img {
  border-radius: var(--radius-lg);
  margin: 2rem auto;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.prose-content figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: #7a8494;
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}
.prose-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: 3rem 0;
}
.prose-content iframe {
  border-radius: var(--radius-lg);
  max-width: 100%;
}

/* Video embed wrapper */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(248, 0, 64, 0.15);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  margin: 2rem 0;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Post nav (prev/next) */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.post-nav-item {
  background: var(--bg2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.post-nav-item:hover {
  border-color: rgba(248, 0, 64, 0.25);
}
.post-nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a8494;
}
.post-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
}
.post-nav-item.next {
  text-align: right;
}

@media (max-width: 600px) {
  .post-nav {
    grid-template-columns: 1fr;
  }
}

/* ---- Tags sidebar / filters ---- */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.tag-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #7a8494;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.tag-btn:hover,
.tag-btn.active {
  background: rgba(248, 0, 64, 0.12);
  color: var(--red);
  border-color: rgba(248, 0, 64, 0.3);
}

/* ---- Note/Warning boxes ---- */
.note-box {
  background: rgba(0, 195, 201, 0.06);
  border: 1px solid rgba(0, 195, 201, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: var(--cyan);
  font-size: 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 2rem 0;
}
.note-box::before {
  content: "ℹ";
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 0.05rem;
}
.warning-box {
  background: rgba(248, 0, 64, 0.06);
  border: 1px solid rgba(248, 0, 64, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: #f87096;
  font-size: 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 2rem 0;
}
.warning-box::before {
  content: "⚠";
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* ---- Footer ---- */
#footer {
  background: #000;
  border-top: 1px solid rgba(248, 0, 64, 0.12);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .nav-logo {
  margin-bottom: 1rem;
}
.footer-brand p {
  font-size: 0.88rem;
  color: #7a8494;
  max-width: 320px;
  line-height: 1.7;
}
.footer-col h5 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-col a {
  color: #7a8494;
  font-size: 0.88rem;
}
.footer-col a:hover {
  color: var(--white);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: #7a8494;
}
.footer-social {
  display: flex;
  gap: 0.75rem;
}
.footer-social a {
  color: #7a8494;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.footer-social a:hover {
  color: var(--white);
  border-color: var(--red);
  background: rgba(248, 0, 64, 0.1);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ---- Utilities ---- */
.text-center {
  text-align: center;
}
.mt-4 {
  margin-top: 2rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header p {
  max-width: 600px;
  margin: 1rem auto 0;
}
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

::-webkit-scrollbar {
  width: 6px;
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(248, 0, 64, 0.35);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--red);
}
::selection {
  background: rgba(248, 0, 64, 0.25);
  color: var(--white);
}
