/* ============ Code With Purpose — shared styles ============ */
:root{
  --void:#06071a;
  --panel:#0d0f2b;
  --panel-2:#11143a;
  --periwinkle:#5b5ff0;
  --periwinkle-deep:#4a4ed6;
  --indigo:#7c7dff;
  --mint:#5eead4;
  --amber:#f5b95e;
  --ink:#f4f5ff;
  --muted:#9aa0c7;
  --muted-2:#c7cbee;
  --line: rgba(244,245,255,0.09);
  --mono: 'JetBrains Mono', monospace;
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
}

*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  background:var(--void);
  color:var(--ink);
  font-family:var(--body);
  line-height:1.6;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none;}
ul{list-style:none;}

.wrap{max-width:1180px;margin:0 auto;padding:0 32px;}

.eyebrow{
  font-family:var(--mono);
  font-size:13px;
  color:var(--mint);
  letter-spacing:0.02em;
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:18px;
}
.eyebrow::before{content:"//";color:var(--muted);}
.eyebrow.hash::before{content:"#";}

h1,h2,h3{
  font-family:var(--display);
  font-weight:600;
  letter-spacing:-0.01em;
}

/* ---------------- NAV ---------------- */
header{
  position:fixed;
  top:0;left:0;right:0;
  z-index:100;
  backdrop-filter:blur(14px);
  background:rgba(6,7,26,0.6);
  border-bottom:1px solid var(--line);
}
.nav{
  max-width:1180px;
  margin:0 auto;
  padding:18px 32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.logo{
  font-family:var(--mono);
  font-weight:600;
  font-size:17px;
  display:flex;
  align-items:center;
  gap:10px;
}
.logo .bracket{color:var(--indigo);}
.nav-links{
  display:flex;
  gap:36px;
  font-size:14.5px;
  color:var(--muted-2);
}
.nav-links a{transition:color .2s;}
.nav-links a:hover, .nav-links a.active{color:var(--mint);}
.nav-cta{
  font-family:var(--mono);
  font-size:13.5px;
  background:var(--indigo);
  color:var(--void);
  padding:10px 18px;
  border-radius:6px;
  font-weight:600;
  transition:transform .2s, background .2s;
}
.nav-cta:hover{background:var(--mint);transform:translateY(-1px);}

@media (max-width:860px){
  .nav-links{display:none;}
}

/* ---------------- MOBILE MENU ---------------- */
.menu-toggle{
  display:none;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  width:36px;
  height:36px;
  background:none;
  border:none;
  cursor:pointer;
  padding:6px;
  z-index:110;
}
.menu-toggle span{
  width:100%;
  height:2px;
  background:var(--ink);
  border-radius:2px;
  transition:transform .25s ease, opacity .2s ease;
}
.menu-toggle.open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.menu-toggle.open span:nth-child(2){opacity:0;}
.menu-toggle.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

.menu-backdrop{
  position:fixed;
  inset:0;
  background:rgba(6,7,26,0.65);
  backdrop-filter:blur(2px);
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease;
  z-index:98;
}
.menu-backdrop.open{opacity:1;pointer-events:auto;}

.mobile-menu{
  position:fixed;
  top:0;right:0;
  height:100vh;
  width:78%;
  max-width:320px;
  background:var(--void);
  border-left:1px solid var(--line);
  padding:110px 32px 40px;
  display:flex;
  flex-direction:column;
  transform:translateX(100%);
  transition:transform .35s cubic-bezier(.22,.68,0,1.01);
  z-index:99;
  overflow-y:auto;
}
.mobile-menu.open{transform:translateX(0);}
.mobile-nav-links{display:flex;flex-direction:column;margin-bottom:32px;}
.mobile-nav-links a{
  font-family:var(--mono);
  font-size:16px;
  color:var(--muted-2);
  padding:16px 0;
  border-bottom:1px solid var(--line);
  transition:color .2s;
}
.mobile-nav-links a:hover, .mobile-nav-links a.active{color:var(--mint);}
.mobile-menu .btn-primary{justify-content:center;}

@media (max-width:860px){
  .menu-toggle{display:flex;}
}
@media (min-width:861px){
  .mobile-menu, .menu-backdrop{display:none !important;}
}

/* ---------------- 3D TILT (cards) ---------------- */
.post-card, .topic-card, .build-item, .project-card{
  will-change:transform;
  transition:transform .2s ease, border-color .25s ease;
}

/* ---------------- 3D CUBE (connect section) ---------------- */
.cube-scene{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  perspective:700px;
}
.cube{
  position:relative;
  width:92px;
  height:92px;
  transform-style:preserve-3d;
  animation:cubeSpin 16s linear infinite;
}
.cube__face{
  position:absolute;
  width:92px;
  height:92px;
  border:1px solid rgba(124,125,255,0.55);
  background:rgba(94,234,212,0.05);
}
.cube__face--front{transform:translateZ(46px);}
.cube__face--back{transform:rotateY(180deg) translateZ(46px);}
.cube__face--right{transform:rotateY(90deg) translateZ(46px);}
.cube__face--left{transform:rotateY(-90deg) translateZ(46px);}
.cube__face--top{transform:rotateX(90deg) translateZ(46px);}
.cube__face--bottom{transform:rotateX(-90deg) translateZ(46px);}
@keyframes cubeSpin{
  from{transform:rotateX(0deg) rotateY(0deg);}
  to{transform:rotateX(360deg) rotateY(360deg);}
}
@media (prefers-reduced-motion: reduce){
  .cube{animation:none;}
}

/* ---------------- BUTTONS ---------------- */
.btn{
  font-family:var(--mono);
  font-size:14.5px;
  font-weight:600;
  padding:14px 24px;
  border-radius:7px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:transform .2s, box-shadow .2s;
}
.btn-primary{background:var(--indigo);color:var(--void);}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 10px 30px rgba(124,125,255,0.35);}
.btn-ghost{border:1px solid var(--line);color:var(--ink);}
.btn-ghost:hover{border-color:var(--indigo);transform:translateY(-2px);}

/* ---------------- SECTION GENERIC ---------------- */
section{padding:110px 0;position:relative;}
.section-head{max-width:640px;margin-bottom:56px;}
.section-head h2{font-size:clamp(28px,3.4vw,40px);}
.section-head p{color:var(--muted);margin-top:14px;font-size:16px;}
.section-head.center{margin-left:auto;margin-right:auto;text-align:center;}

/* ---------------- FOOTER ---------------- */
footer{
  padding:40px 0 60px;
  text-align:center;
  color:var(--muted);
  font-family:var(--mono);
  font-size:13px;
  border-top:1px solid var(--line);
  margin-top:40px;
}

:focus-visible{outline:2px solid var(--mint);outline-offset:3px;}

/* ---------------- PAGE ZOOM TRANSITIONS ---------------- */
html{ overflow-x:hidden; }
body{
  transform-origin:50% 50%;
  will-change:transform, opacity, filter;
}
body.zt-enter{
  animation: ztEnter .6s cubic-bezier(.22,.68,0,1.01) both;
}
body.zt-exit{
  animation: ztExit .45s cubic-bezier(.55,0,1,.45) forwards;
}
@keyframes ztEnter{
  from{ transform:scale(1.35); opacity:0; filter:blur(6px); }
  to{ transform:scale(1); opacity:1; filter:blur(0); }
}
@keyframes ztExit{
  from{ transform:scale(1); opacity:1; filter:blur(0); }
  to{ transform:scale(2.2); opacity:0; filter:blur(10px); }
}
@media (prefers-reduced-motion: reduce){
  body.zt-enter, body.zt-exit{ animation:none !important; }
}

/* ---------------- PAGE HERO (used on inner pages) ---------------- */
.page-hero{
  padding:160px 0 70px;
  border-bottom:1px solid var(--line);
}
.page-hero h1{font-size:clamp(34px,5vw,52px);margin-bottom:16px;}
.page-hero p{color:var(--muted-2);max-width:560px;font-size:17px;}

/* ---------------- BLOG GRID (shared by home teaser + blog listing) ---------------- */
.post-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
}
.post-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  padding:28px;
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:230px;
  transition:transform .25s, border-color .25s;
}
.post-card:hover{transform:translateY(-6px);border-color:var(--indigo);}
.post-meta{font-family:var(--mono);font-size:12px;color:var(--mint);}
.post-card h3{font-size:18px;line-height:1.35;}
.post-card p{color:var(--muted);font-size:14px;flex-grow:1;}
.post-link{font-family:var(--mono);font-size:13px;color:var(--indigo);display:inline-flex;align-items:center;gap:6px;}

/* coming soon variant */
.post-card.soon{
  background:repeating-linear-gradient(135deg, var(--panel), var(--panel) 10px, var(--panel-2) 10px, var(--panel-2) 20px);
  border-style:dashed;
  border-color:rgba(245,185,94,0.35);
  opacity:0.9;
}
.post-card.soon .post-meta{color:var(--amber);}
.post-card.soon h3{color:var(--muted-2);}
.post-card.soon .post-link{color:var(--amber);}
.badge-soon{
  font-family:var(--mono);
  font-size:11px;
  color:var(--amber);
  border:1px solid rgba(245,185,94,0.4);
  padding:3px 9px;
  border-radius:20px;
  width:fit-content;
}

/* ---------------- FILTER TABS (blog listing) ---------------- */
.filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:40px;
}
.filter-tab{
  font-family:var(--mono);
  font-size:13px;
  color:var(--muted-2);
  border:1px solid var(--line);
  padding:8px 16px;
  border-radius:20px;
  cursor:pointer;
  transition:all .2s;
  background:transparent;
}
.filter-tab:hover{border-color:var(--indigo);}
.filter-tab.active{background:var(--indigo);color:var(--void);border-color:var(--indigo);}

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

/* ---------------- POST TEMPLATE ---------------- */
.post-body{
  max-width:720px;
  margin:0 auto;
  padding:60px 0 100px;
}
.post-body h2{font-size:26px;margin:40px 0 16px;}
.post-body h3{font-size:20px;margin:32px 0 14px;color:var(--muted-2);}
.post-body p{color:var(--muted-2);font-size:16.5px;margin-bottom:18px;}
.post-body ul, .post-body ol{margin:0 0 18px 22px;color:var(--muted-2);font-size:16.5px;}
.post-body li{margin-bottom:8px;}
.post-body blockquote{
  border-left:3px solid var(--indigo);
  padding:6px 0 6px 20px;
  color:var(--muted-2);
  font-style:italic;
  margin:24px 0;
}
.post-body pre{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:10px;
  padding:20px;
  overflow-x:auto;
  font-family:var(--mono);
  font-size:13.5px;
  color:var(--muted-2);
  margin:24px 0;
}
.post-body code{
  font-family:var(--mono);
  background:var(--panel);
  padding:2px 6px;
  border-radius:4px;
  font-size:0.9em;
}
.post-header{
  max-width:720px;
  margin:0 auto;
  padding-top:150px;
}
.post-header .eyebrow{margin-bottom:20px;}
.post-header h1{font-size:clamp(30px,4.4vw,44px);margin-bottom:18px;line-height:1.15;}
.post-header .post-info{
  display:flex;
  gap:18px;
  color:var(--muted);
  font-family:var(--mono);
  font-size:13px;
  border-bottom:1px solid var(--line);
  padding-bottom:28px;
}
.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--mono);
  font-size:13.5px;
  color:var(--muted);
  margin-bottom:24px;
  transition:color .2s;
}
.back-link:hover{color:var(--mint);}
.post-tags{display:flex;gap:10px;margin-top:20px;}
.tag{
  font-family:var(--mono);
  font-size:11.5px;
  color:var(--indigo);
  border:1px solid var(--line);
  padding:4px 12px;
  border-radius:20px;
}
.post-cta{
  margin-top:50px;
  padding:32px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  text-align:center;
}
.post-cta p{margin-bottom:18px;}

@media (max-width:480px){
  .wrap{padding:0 20px;}
  section{padding:80px 0;}
}

/* ---------------- RESOURCE CARDS (Resources page) ---------------- */
.resource-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:24px;
}
.resource-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  padding:28px;
  display:flex;
  flex-direction:column;
  gap:14px;
  transition:transform .25s, border-color .25s;
}
.resource-card:hover{transform:translateY(-6px);border-color:var(--indigo);}
.resource-icon{
  width:44px;height:44px;
  border-radius:10px;
  background:rgba(124,125,255,0.12);
  border:1px solid rgba(124,125,255,0.3);
  display:flex;align-items:center;justify-content:center;
  color:var(--indigo);
  font-family:var(--mono);
  font-size:15px;
  font-weight:700;
}
.resource-card h3{font-size:19px;line-height:1.3;}
.resource-card p{color:var(--muted);font-size:14.5px;flex-grow:1;}
.resource-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.resource-download{
  font-family:var(--mono);
  font-size:13.5px;
  font-weight:600;
  color:var(--void);
  background:var(--mint);
  padding:12px 20px;
  border-radius:7px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:fit-content;
  transition:transform .2s, box-shadow .2s;
}
.resource-download:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(94,234,212,0.28);}
.resource-links{display:flex;gap:12px;flex-wrap:wrap;align-items:center;}
.resource-guide-link{
  font-family:var(--mono);
  font-size:13px;
  color:var(--indigo);
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:color .2s;
}
.resource-guide-link:hover{color:var(--mint);}

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