/* Crelow Ghost Theme — main.css */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg0:#020617;--bg1:#0B1326;--bg2:#0F1F3D;
  --blue:#2563EB;--blue-l:#60A5FA;--blue-p:#C7D2FE;
  --white:#FFFFFF;--s1:#E5E7EB;--s2:#C8D8F0;--s3:#8BAFD4;
  --font:'Space Grotesk','Helvetica Neue',sans-serif;
  --max-w:1200px;--post-w:720px;
}
html{scroll-behavior:smooth}
body{background:var(--bg0);color:var(--white);font-family:var(--font);font-weight:400;line-height:1.6;overflow-x:hidden;min-height:100vh}

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

/* STARS */
.stars{position:fixed;inset:0;pointer-events:none;z-index:0;overflow:hidden}
.star{position:absolute;background:white;border-radius:50%;animation:twinkle var(--d,4s) ease-in-out infinite var(--dl,0s);opacity:var(--o,.3)}
@keyframes twinkle{0%,100%{opacity:var(--o,.3);transform:scale(1)}50%{opacity:calc(var(--o,.3)*3);transform:scale(1.5)}}

/* NAV */
.site-nav{position:fixed;top:0;left:0;right:0;z-index:200;padding:1.25rem 3rem;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(to bottom,rgba(2,6,23,.95) 0%,transparent 100%);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.nav-logo{display:flex;align-items:center;text-decoration:none}
.nav-right{display:flex;align-items:center;gap:2rem}
.nav-links{display:flex;align-items:center;gap:1.5rem;list-style:none}
.nav-links a{color:var(--s3);text-decoration:none;font-size:.8rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;transition:color 200ms ease}
.nav-links a:hover{color:var(--white)}
.nav-cta{color:var(--blue-l);text-decoration:none;font-size:.8rem;font-weight:500;letter-spacing:.05em;border:1px solid rgba(37,99,235,.3);border-radius:9999px;padding:.4rem 1rem;transition:all 200ms ease}
.nav-cta:hover{color:var(--white);border-color:var(--blue-l)}

/* MAIN */
.site-main{position:relative;z-index:1;min-height:80vh}

/* HOME HERO */
.home-hero{text-align:center;padding:10rem 2rem 4rem;max-width:var(--max-w);margin:0 auto}
.hero-eyebrow{display:inline-flex;align-items:center;gap:.5rem;font-size:.6875rem;font-weight:500;letter-spacing:.35em;text-transform:uppercase;color:var(--blue-l);border:1px solid rgba(96,165,250,.2);border-radius:9999px;padding:.4rem 1.25rem;margin-bottom:2rem}
.eyebrow-dot{width:6px;height:6px;background:var(--blue-l);border-radius:50%;animation:pulse 2s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.6)}}
.hero-title{font-size:clamp(2.5rem,5vw,4.5rem);font-weight:300;line-height:1.1;letter-spacing:-.02em;margin-bottom:1rem}
.hero-title em{font-style:normal;background:linear-gradient(135deg,#FFF 0%,#C7D2FE 50%,#60A5FA 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.hero-sub{font-size:1.05rem;font-weight:300;color:var(--s3);max-width:500px;margin:0 auto}

/* POSTS GRID */
.posts-section{max-width:var(--max-w);margin:0 auto;padding:3rem 3rem 6rem}
.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}

/* POST CARD */
.post-card{background:var(--bg1);border:1px solid rgba(37,99,235,.15);border-radius:20px;overflow:hidden;transition:all 300ms ease;display:flex;flex-direction:column}
.post-card:hover{border-color:rgba(37,99,235,.4);box-shadow:0 8px 40px rgba(0,0,0,.5),0 0 24px rgba(37,99,235,.12);transform:translateY(-4px)}
.post-card-image-link{display:block;height:200px;overflow:hidden}
.post-card-image{width:100%;height:100%;background-size:cover;background-position:center;transition:transform 400ms ease}
.post-card:hover .post-card-image{transform:scale(1.04)}
.post-card-body{padding:1.5rem;display:flex;flex-direction:column;flex:1}
.post-card-tag{font-size:.6875rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--blue-l);text-decoration:none;margin-bottom:.75rem;display:block}
.post-card-title{font-size:1.1rem;font-weight:500;line-height:1.3;letter-spacing:-.01em;margin-bottom:.75rem;flex:1}
.post-card-title a{color:var(--white);text-decoration:none;transition:color 200ms ease}
.post-card-title a:hover{color:var(--blue-l)}
.post-card-excerpt{font-size:.875rem;color:var(--s3);line-height:1.6;margin-bottom:1.25rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.post-card-meta{display:flex;align-items:center;gap:.75rem;border-top:1px solid rgba(37,99,235,.1);padding-top:1rem;margin-top:auto}
.author-avatar{width:28px;height:28px;border-radius:50%;object-fit:cover;border:1px solid rgba(37,99,235,.3)}
.author-name{font-size:.8rem;font-weight:500;color:var(--s2)}
.post-date{font-size:.75rem;color:var(--s3);margin-left:auto}

/* PAGINATION */
.pagination{display:flex;justify-content:center;align-items:center;gap:1rem;padding:3rem 0;font-size:.875rem}
.pagination a{color:var(--blue-l);text-decoration:none;border:1px solid rgba(37,99,235,.3);border-radius:9999px;padding:.5rem 1.25rem;transition:all 200ms ease}
.pagination a:hover{border-color:var(--blue-l);color:var(--white)}
.pagination .page-number{color:var(--s3)}

/* SINGLE POST */
.post-full{max-width:var(--post-w);margin:0 auto;padding:8rem 2rem 5rem}
.post-full-header{margin-bottom:2.5rem}
.post-tag{font-size:.6875rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase;color:var(--blue-l);text-decoration:none;margin-bottom:1rem;display:inline-block}
.post-full-title{font-size:clamp(2rem,4vw,3.5rem);font-weight:300;line-height:1.1;letter-spacing:-.02em;margin-bottom:1rem}
.post-full-excerpt{font-size:1.2rem;color:var(--s2);font-weight:300;line-height:1.6;margin-bottom:1.5rem}
.post-full-meta{display:flex;align-items:center;gap:1rem}
.author-avatar-lg{width:40px;height:40px;border-radius:50%;object-fit:cover;border:2px solid rgba(37,99,235,.3)}
.post-full-meta-text{display:flex;flex-direction:column;gap:.2rem}
.post-full-meta-text .author-name{font-size:.9rem;font-weight:500;color:var(--white)}
.post-full-meta-text .post-date{font-size:.8rem;color:var(--s3)}
.post-full-image{margin:2rem -2rem 3rem;border-radius:16px;overflow:hidden}
.post-full-image img{width:100%;height:auto;display:block;max-height:500px;object-fit:cover}

/* POST CONTENT */
.gh-content{font-size:1.05rem;line-height:1.8;color:var(--s1)}
.gh-content h2{font-size:1.75rem;font-weight:500;color:var(--white);margin:2.5rem 0 1rem;letter-spacing:-.01em}
.gh-content h3{font-size:1.35rem;font-weight:500;color:var(--white);margin:2rem 0 .75rem}
.gh-content h4{font-size:1.1rem;font-weight:500;color:var(--white);margin:1.5rem 0 .5rem}
.gh-content p{margin-bottom:1.5rem}
.gh-content a{color:var(--blue-l);text-decoration:underline;text-decoration-color:rgba(96,165,250,.4);transition:all 200ms ease}
.gh-content a:hover{color:var(--white);text-decoration-color:var(--blue-l)}
.gh-content strong{color:var(--white);font-weight:600}
.gh-content em{color:var(--blue-p);font-style:italic}
.gh-content ul,.gh-content ol{margin:1.25rem 0 1.5rem 1.5rem}
.gh-content li{margin-bottom:.5rem;color:var(--s2)}
.gh-content blockquote{border-left:3px solid var(--blue);padding:.75rem 0 .75rem 1.5rem;margin:2rem 0;background:var(--bg1);border-radius:0 12px 12px 0;padding-right:1.5rem}
.gh-content blockquote p{color:var(--s2);font-style:italic;margin:0}
.gh-content pre{background:var(--bg1);border:1px solid rgba(37,99,235,.2);border-radius:12px;padding:1.5rem;overflow-x:auto;margin:1.5rem 0}
.gh-content code{font-family:'SF Mono','Fira Code',monospace;font-size:.875em;color:var(--blue-l)}
.gh-content pre code{color:var(--s2);font-size:.9rem}
.gh-content img{width:100%;border-radius:12px;margin:1.5rem 0}
.gh-content hr{border:none;border-top:1px solid rgba(37,99,235,.2);margin:3rem 0}
.gh-content figure{margin:2rem 0}
.gh-content figcaption{text-align:center;font-size:.8rem;color:var(--s3);margin-top:.5rem}

/* POST FOOTER */
.post-full-footer{margin-top:3rem;padding-top:2rem;border-top:1px solid rgba(37,99,235,.1);display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem}
.post-tags{display:flex;gap:.5rem;flex-wrap:wrap}
.post-tag-link{font-size:.75rem;color:var(--blue-l);text-decoration:none;border:1px solid rgba(37,99,235,.2);border-radius:9999px;padding:.25rem .75rem;transition:all 200ms ease}
.post-tag-link:hover{border-color:var(--blue-l);color:var(--white)}
.back-link{color:var(--s3);text-decoration:none;font-size:.875rem;transition:color 200ms ease}
.back-link:hover{color:var(--blue-l)}

/* TAG PAGE */
.tag-header{text-align:center;padding:9rem 2rem 3rem;max-width:var(--max-w);margin:0 auto}
.tag-label{font-size:.6875rem;letter-spacing:.35em;text-transform:uppercase;color:var(--blue-l);display:block;margin-bottom:1rem}
.tag-title{font-size:clamp(2rem,4vw,3.5rem);font-weight:300;letter-spacing:-.02em}
.tag-desc{color:var(--s3);margin-top:1rem;font-size:1rem}

/* SUBSCRIBE */
.subscribe-section{max-width:var(--post-w);margin:0 auto;padding:3rem 2rem 5rem;text-align:center}
.subscribe-section h3{font-size:1.5rem;font-weight:300;margin-bottom:.5rem}
.subscribe-section p{color:var(--s3);margin-bottom:1.5rem}
.subscribe-form{display:flex;gap:.75rem;max-width:420px;margin:0 auto}
.subscribe-form input{flex:1;background:var(--bg1);border:1px solid rgba(37,99,235,.3);border-radius:9999px;padding:.75rem 1.25rem;color:var(--white);font-family:var(--font);font-size:.9rem;outline:none;transition:border-color 200ms ease}
.subscribe-form input:focus{border-color:var(--blue-l)}
.subscribe-form button{background:var(--blue);color:var(--white);border:none;border-radius:9999px;padding:.75rem 1.5rem;font-family:var(--font);font-size:.875rem;font-weight:500;cursor:pointer;transition:all 200ms ease}
.subscribe-form button:hover{background:#1D4ED8;box-shadow:0 0 20px rgba(37,99,235,.4)}
.subscribe-success{display:none;color:var(--blue-l);font-size:.875rem;margin-top:.75rem}
.subscribed{color:var(--blue-l)}

/* FOOTER */
.site-footer{border-top:1px solid rgba(37,99,235,.1);position:relative;z-index:1;padding:2rem 3rem}
.footer-inner{max-width:var(--max-w);margin:0 auto;display:flex;align-items:center;justify-content:space-between}
.footer-logo{color:var(--s3);text-decoration:none;font-size:.9rem;font-weight:500;letter-spacing:.2em}
.footer-links{display:flex;gap:2rem}
.footer-links a{color:var(--s3);text-decoration:none;font-size:.8rem;transition:color 200ms ease}
.footer-links a:hover{color:var(--white)}
.footer-copy{font-size:.8rem;color:var(--s3)}

/* RESPONSIVE */
@media(max-width:900px){.posts-grid{grid-template-columns:repeat(2,1fr)}.site-nav{padding:1rem 1.5rem}.nav-links{display:none}.posts-section{padding:2rem 1.5rem 4rem}}
@media(max-width:600px){.posts-grid{grid-template-columns:1fr}.post-full{padding:6rem 1.5rem 4rem}.footer-inner{flex-direction:column;gap:1rem;text-align:center}}
