/* ─── 459 Crimes — Landing Page ───
   Cream paper + cyan/magenta accents + physics-driven 3D cube
*/
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:17px;scroll-behavior:smooth;text-rendering:optimizeLegibility}

:root{
  --text:#1b1b1b;
  --text-muted:#565656;
  --text-faint:#7d7d7d;
  --bg:#faf8f4;
  --bg-alt:#f0ede4;
  --bg-raised:#ffffff;
  --border:#ddd8ce;
  --border-light:#e9e3d8;
  --accent:#256ba0;
  --accent-light:#eaf1f7;
  --red:#c0392b;
  --gold:#b8860b;
  --cyan:#1a7e7e;
  --cyan-glow:rgba(26,126,126,.15);
  --magenta:#a03070;
  --magenta-glow:rgba(160,48,112,.12);
  --font-heading:system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',sans-serif;
  --font-mono:'Courier New',Consolas,monospace;
}

body{
  font-family:Georgia,'Times New Roman',serif;
  color:var(--text);background:var(--bg);
  line-height:1.7;-webkit-font-smoothing:antialiased;
  min-height:100vh;display:flex;flex-direction:column;align-items:center;
}

/* ─── 3D Cube ─── */
.cube-stage{
  width:100px;height:100px;perspective:400px;
  margin:2rem 0 1.5rem;position:relative;
}
.cube-stage::after{
  content:'';position:absolute;bottom:-12px;left:50%;
  transform:translateX(-50%);
  width:40px;height:7px;
  background:radial-gradient(ellipse,rgba(0,0,0,.12) 0%,transparent 70%);
  border-radius:50%;
}
.cube{
  width:100%;height:100%;position:relative;
  transform-style:preserve-3d;
  will-change:transform;
}
.cube-face{
  position:absolute;width:100%;height:100%;
  overflow:hidden;
  background:#0e1515;
  box-shadow:inset 0 0 0 1px rgba(0,180,180,.15);
  backface-visibility:hidden;
}
.cube-face img{
  position:absolute;top:50%;left:50%;
  transform:translate(-50%,-50%);
  width:160%;height:auto;min-width:160%;min-height:160%;
  object-fit:cover;
}
/* 6 cube faces positioned in 3D */
.cube-face.front{ transform:rotateY(  0deg) translateZ(50px); }
.cube-face.right{ transform:rotateY( 90deg) translateZ(50px); }
.cube-face.back{  transform:rotateY(180deg) translateZ(50px); }
.cube-face.left{  transform:rotateY(270deg) translateZ(50px); }
.cube-face.top{   transform:rotateX( 90deg) translateZ(50px); }
.cube-face.bottom{transform:rotateX(-90deg) translateZ(50px); }

/* ─── Site identity ─── */
.site-title{
  font-family:var(--font-heading);font-weight:800;font-size:1.8rem;
  text-align:center;letter-spacing:.03em;color:var(--text);
  margin-bottom:.15rem;
}
.site-tagline{
  text-align:center;font-size:.9rem;color:var(--text-muted);
  letter-spacing:.06em;text-transform:uppercase;
  font-family:var(--font-heading);font-weight:500;
  margin-bottom:.8rem;
}

/* ─── Social Icons ─── */
.social-row{
  display:flex;justify-content:center;gap:.8rem;flex-wrap:wrap;
  margin-bottom:2.5rem;padding:0 1rem;
}
.social-row a{
  display:flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:50%;
  background:var(--bg-alt);border:1px solid var(--border);
  transition:border-color .2s,background .2s,transform .15s;
}
.social-row a:hover{border-color:var(--cyan);background:#e8f7f7;transform:scale(1.08)}
.social-row a svg{width:18px;height:18px;fill:var(--text-muted)}
.social-row a:hover svg{fill:var(--cyan)}

/* ─── Navigation cards ─── */
.article-nav{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:1.2rem;max-width:640px;width:100%;padding:0 1.25rem;margin-bottom:2.5rem;
}
.article-card{
  display:block;padding:1rem 1.2rem;
  border:1px solid var(--border);
  background:var(--bg-raised);
  text-decoration:none;color:var(--text);
  transition:border-color .2s,box-shadow .2s,transform .15s;
  position:relative;overflow:hidden;
}
.article-card::before{
  content:'';position:absolute;top:0;left:0;right:0;height:3px;
  background:var(--cyan);opacity:0;transition:opacity .25s;
}
.article-card:hover{
  border-color:var(--cyan);
  box-shadow:0 2px 16px var(--cyan-glow);
  transform:translateY(-1px);
}
.article-card:hover::before{opacity:1}
.article-card .card-icon{font-size:1.4rem;display:block;margin-bottom:.35rem}
.article-card h3{
  font-family:var(--font-heading);font-weight:700;font-size:1rem;margin-bottom:.3rem;
}
.article-card p{
  font-size:.85rem;color:var(--text-muted);line-height:1.5;margin-bottom:.5rem;
}
.article-card .card-tag{
  display:inline-block;font-family:var(--font-heading);
  font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;
  padding:.1em .5em;border-radius:2px;
  color:var(--cyan);border:1px solid var(--cyan);
}
.article-card-soon{opacity:.6;cursor:default;pointer-events:none}
.article-card-soon .card-tag{border-color:var(--text-muted);color:var(--text-muted)}

/* ─── Footer ─── */
.site-footer{
  text-align:center;padding:1.5rem 1rem 2.5rem;
  font-size:.78rem;color:var(--text-muted);max-width:640px;width:100%;
  border-top:3px solid var(--cyan);
  margin-top:auto;
}
.site-footer a{color:var(--cyan);text-decoration:underline;text-underline-offset:2px}
.site-footer a:hover{color:var(--magenta)}
.site-footer .footer-links{display:flex;justify-content:center;gap:1.5rem;flex-wrap:wrap;margin-bottom:.8rem}
.site-footer .footer-links a{text-decoration:none;font-family:var(--font-heading);font-size:.75rem}

/* ─── Theme toggle ─── */
.theme-toggle{
  position:fixed;top:1rem;right:1rem;
  display:flex;align-items:center;gap:.3rem;
  padding:.35rem .65rem;border:1px solid var(--border);border-radius:4px;
  background:var(--bg);cursor:pointer;
  font-family:var(--font-heading);font-size:.72rem;color:var(--text-muted);
  transition:background .12s,color .12s,border-color .12s;z-index:10;
}
.theme-toggle:hover{border-color:var(--cyan);color:var(--cyan);background:#e8f7f7}
.theme-toggle .icon{font-size:.85rem;line-height:1}

/* ─── Dark mode ─── */
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --text:#ddd8ce;--text-muted:#9c968c;--text-faint:#7a746a;
    --bg:#1a1814;--bg-alt:#23211c;--bg-raised:#2b2822;
    --border:#4d4840;--border-light:#3b3630;
    --accent:#5696c8;--accent-light:#1e2a38;
    --cyan:#2ea0a0;--cyan-glow:rgba(46,160,160,.18);
    --magenta:#c86090;--magenta-glow:rgba(200,96,144,.15);
  }
  :root:not([data-theme="light"]) .cube-face{background:#0a1010}
  :root:not([data-theme="light"]) .article-card:hover{box-shadow:0 2px 20px var(--cyan-glow)}
  :root:not([data-theme="light"]) img{opacity:.9}
  :root:not([data-theme="light"]) .social-row a svg{fill:var(--text-muted)}
  :root:not([data-theme="light"]) .social-row a:hover,.theme-toggle:hover{background:#1a2a2a}
  :root:not([data-theme="light"]) .social-row a:hover svg{fill:var(--cyan)}
}
:root[data-theme="dark"]{
  --text:#ddd8ce;--text-muted:#9c968c;--text-faint:#7a746a;
  --bg:#1a1814;--bg-alt:#23211c;--bg-raised:#2b2822;
  --border:#4d4840;--border-light:#3b3630;
  --accent:#5696c8;--accent-light:#1e2a38;
  --cyan:#2ea0a0;--cyan-glow:rgba(46,160,160,.18);
  --magenta:#c86090;--magenta-glow:rgba(200,96,144,.15);
}
:root[data-theme="dark"] .cube-face{background:#0a1010}
:root[data-theme="dark"] .article-card:hover{box-shadow:0 2px 20px var(--cyan-glow)}
:root[data-theme="dark"] img{opacity:.9}
:root[data-theme="dark"] .social-row a svg{fill:var(--text-muted)}
:root[data-theme="dark"] .social-row a:hover,.theme-toggle:hover{background:#1a2a2a}
:root[data-theme="dark"] .social-row a:hover svg{fill:var(--cyan)}

@media(max-width:600px){
  .cube-stage{width:80px;height:80px;margin:1.5rem 0 1rem}
  .cube-face.front{ transform:rotateY(  0deg) translateZ(40px); }
  .cube-face.right{ transform:rotateY( 90deg) translateZ(40px); }
  .cube-face.back{  transform:rotateY(180deg) translateZ(40px); }
  .cube-face.left{  transform:rotateY(270deg) translateZ(40px); }
  .cube-face.top{   transform:rotateX( 90deg) translateZ(40px); }
  .cube-face.bottom{transform:rotateX(-90deg) translateZ(40px); }
  .site-title{font-size:1.4rem}
}

@media print{
  .theme-toggle,.cube{display:none}
}
