@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600;700;800&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
:root {
  --bg: #121416;
  --white: #ffffff;
  --black: #111110;
  --dark: #1b1f24;
  --grey: #888884;
  --grey-light: #e8e8e5;
  --blurple: #5865F2;
  --green: #3BA55D;
  color-scheme: dark;
}
body { background: var(--bg); color: var(--grey-light); font-family: 'Noto Sans', system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.5; }

nav { display: flex; align-items: center; justify-content: space-between; padding: 0 48px; height: 56px; border-bottom: 1px solid var(--dark); background: var(--black); position: sticky; top: 0; z-index: 100; }
.nav-title { font-size: 14px; font-weight: 600; color: var(--grey-light); letter-spacing: -0.01em; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a.navlink { font-size: 13px; font-weight: 500; color: var(--grey-light); text-decoration: none; }
.nav-links a.navlink:hover, .nav-links a.navlink.active { color: var(--white); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.join-btn { background: var(--blurple); border: 1px solid transparent; border-radius: 6px; color: var(--white); font-family: inherit; font-size: 12px; font-weight: 500; padding: 6px 13px; cursor: pointer; transition: all .15s; text-decoration: none; }
.join-btn:hover { filter: brightness(1.1); }

.header { background: var(--bg); border-bottom: 1px solid var(--dark); padding: 44px 48px 15px; position: sticky; top: 56px; z-index: 99; }
.header-inner { max-width: 1100px; margin: 0 auto; }
.header-eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--grey-light); margin-bottom: 10px; }
.header h1 { font-size: clamp(30px, 4.5vw, 50px); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: var(--white); margin-bottom: 12px; max-width: 18ch; }
.header h1 span { color: var(--blurple); }
.header-sub { color: var(--grey-light); font-size: 14px; max-width: 520px; line-height: 1.6; }
.search-filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 40px auto 24px auto; }
.recently-updated {display: flex; gap: 4px; flex-wrap: wrap; margin: 40px auto 14px auto; font-size: 12px; color: var(--grey-light);}

.layout { max-width: 1100px; margin: 0 auto; padding: 40px 48px 90px; display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; position: sticky; }
.layout.single { max-width: 1100px; margin: 0 auto; padding: 40px 48px 90px; display: block; grid-template-columns: 1fr; gap: 56px; align-items: start; }
.layout.double { grid-template-columns: 1fr 1fr; }

.post { padding: 28px 0; border-bottom: 1px solid var(--dark); }
.post:first-child { padding-top: 0; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--grey-light); border: 1px solid var(--white); border-radius: 5px; padding: 3px 7px; }
.post-date { font-size: 12px; color: var(--grey); font-weight: 500; }
.post h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 10px; }
.post h2 a { color: var(--white); text-decoration: none; }
.post h2 a:hover { color: var(--blurple); }
.post p { font-size: 13.5px; line-height: 1.65; color: var(--grey-light); max-width: 100ch; }
.emoji { height: 1.3em; width: auto; vertical-align: -0.3em; margin: 0 2px; }
.post-link { display: inline-block; margin-top: 14px; font-size: 12.5px; font-weight: 600; color: var(--blurple); text-decoration: none; }
.post-link:hover { text-decoration: underline; }

.side-block { border: 1px solid var(--dark); border-radius: 10px; padding: 22px; margin-bottom: 20px; background: var(--dark); }
.side-block h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--white); margin-bottom: 14px; }
.side-block p { font-size: 12.5px; color: var(--grey-light); line-height: 1.6; margin-bottom: 14px; }
.lib-link { display: block; padding: 9px 0; border-top: 1px solid var(--bg); font-size: 12.5px; color: var(--grey-light); text-decoration: none; }
.lib-link:first-of-type { border-top: none; }
.lib-link:hover { color: var(--white); }
.lib-link .lib-cat { display: block; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey); margin-bottom: 2px; }

.lib-groups { display: flex; flex-direction: column; gap: 34px; }
.lib-group h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--white); margin-bottom: 4px; }
.lib-group .lib-desc { font-size: 12.5px; color: var(--grey); margin-bottom: 12px; }
.lib-item { padding: 16px 0; border-top: 1px solid var(--dark); }
.lib-item:last-child { border-bottom: 1px solid var(--dark); }
.lib-item h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.lib-item h4 a { color: var(--white); text-decoration: none; }
.lib-item h4 a:hover { color: var(--blurple); }
.lib-item p { font-size: 13px; color: var(--grey-light); }

/* Article page */
.back-link { display: inline-block; font-size: 12.5px; color: var(--grey); text-decoration: none; margin-bottom: 18px; }
.back-link:hover { color: var(--white); }
article.article-body { max-width: 640px; }
article.article-body ul, article.article-body ol { padding-left: 24px; }
article.article-body ul ul, article.article-body ol ol { margin-left: 24px; }
article.article-body ul ul li, article.article-body ol ol li { margin-left: -20px; }
article.article-body > ul > li, article.article-body > ol > li { margin-bottom: 20px; }
article.article-body p { font-size: 15px; line-height: 1.75; color: var(--grey-light); margin-bottom: 18px; }
article.article-body h2 { font-size: 18px; font-weight: 700; color: var(--white); margin: 30px 0 12px; letter-spacing: -0.01em; scroll-margin-top: 1000px;}
article.article-body blockquote { border-left: 4px solid #4e5058; padding-left: 16px; margin: 16px 0; color: #dbdee1; }
article.article-body code { background: var(--dark); border: 1px solid #33383d; border-radius: 4px; padding: 3px 6px; font-family: monospace; font-size: 0.9em; }
.share-row { display: flex; align-items: center; gap: 10px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--dark); }
.share-btn { background: var(--dark); border: 1px solid var(--grey); border-radius: 6px; color: var(--white); font-family: inherit; font-size: 12px; font-weight: 500; padding: 7px 14px; cursor: pointer; transition: all .15s; }
.share-btn:hover { border-color: var(--white); }
.share-btn.copied { border-color: var(--blurple); color: var(--blurple); }

/* Copy Block */
.copy-block { position: relative; background: var(--dark); border: 1px solid var(--grey); border-radius: 8px; padding: 10px; cursor: pointer; overflow: hidden; color: var(--grey-light); font-family: monospace; transition: border-color 0.2s; }
.copy-block:hover { border-color: var(--blurple); }
.copy-content { transition: filter 0.3s ease; }
.copy-block.copied .copy-content { filter: blur(5px); }
.copy-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--white); font-weight: 700; opacity: 0; visibility: hidden; transition: all 0.3s ease; pointer-events: none; }
.copy-block.copied .copy-overlay { opacity: 1; visibility: visible; }

/* Big wordmark */
.brand-mark { overflow: hidden; text-align: center; padding: 70px 20px 0; margin-top: 40px; }
.brand-mark span {
  display: inline-block; font-weight: 800; line-height: 0.88; letter-spacing: -0.04em;
  font-size: clamp(64px, 17vw, 230px);
  background: linear-gradient(135deg, var(--blurple), #b6bdff 65%, var(--white));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}

/* Footer */
.footer-wrap { border-top: 1px solid var(--dark); margin-top: 30px; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 40px 48px 12px; display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--grey); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: var(--grey-light); text-decoration: none; margin-bottom: 9px; }
.footer-col a:hover { color: var(--white); }
footer { text-align: left; padding: 18px 48px 26px; color: var(--grey); font-size: 12px; max-width: 1100px; margin: 0 auto; border-top: 1px solid var(--dark); }
footer a { color: var(--grey-light); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--white); }

a { color: var(--blurple); }

@media (max-width: 640px) { .footer-inner, footer { padding-left: 20px; padding-right: 20px; } }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .layout.double { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  nav, .header-inner, .layout, .layout.single { padding-left: 20px; padding-right: 20px; }
  .header h1 { font-size: 28px; }
  .nav-links { display: none; }
}
.gallery-img { display: none; }
.gallery-img.active { display: block; }
.gallery-btn { background: rgba(255, 255, 255, 0.1); color: white; border: none; cursor: pointer; padding: 8px 12px; border-radius: 4px; }
.gallery-btn:hover { background: rgba(255, 255, 255, 0.2); }
.gallery-btn.prev { left: 8px; }
.gallery-btn.next { right: 8px; }

@media (max-width: 768px) {

  .layout, .layout.single { padding: 40px 20px 90px; }
  
  .search-filters > div {
    flex-basis: 100% !important;
  }

  .share-row {
    flex-wrap: wrap !important; 
  }
  
  .share-row > span:nth-of-type(1):not(:last-of-type) { 
    order: 3; 
    flex-basis: 100%; 
    margin-top: 4px; 
  }

  .nav-links { 
    display: flex; 
    position: absolute; 
    top: 60px; 
    left: 40px; 
    background: var(--dark); 
    padding: 16px 24px; 
    border-radius: 8px; 
    flex-direction: row; 
    align-items: center;
    gap: 10px;
    z-index: 100;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }
  
  .nav-links.show { 
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a:not(:last-child)::after {
    content: "|";
    margin-left: 10px; 
    color: var(--grey-light); 
  }
}

/* DW about it */
#badge-6, #badge-7 { cursor: pointer; }

.meme-egg {
  position: fixed; top: 50%;
  width: 200px; height: auto;
  z-index: 99999; pointer-events: none; opacity: 0;
  image-rendering: pixelated;
  margin-top: -100px;
}

.meme-left { left: 0; animation: memeSlideLeft 3.5s ease-in-out forwards; }
.meme-right { right: 0; animation: memeSlideRight 3.5s ease-in-out forwards; }

@keyframes memeSlideLeft {
  0% { transform: translate3d(-300px, 0, 0) rotate(0deg); opacity: 0; }
  15% { transform: translate3d(50px, 0, 0) rotate(-10deg); opacity: 1; }
  30% { transform: translate3d(50px, -100px, 0) rotate(-10deg); opacity: 1; }
  45% { transform: translate3d(50px, 100px, 0) rotate(-10deg); opacity: 1; }
  60% { transform: translate3d(50px, -100px, 0) rotate(-10deg); opacity: 1; }
  75% { transform: translate3d(50px, 0, 0) rotate(-10deg); opacity: 1; }
  85% { transform: translate3d(50px, 0, 0) rotate(-10deg); opacity: 1; }
  100% { transform: translate3d(-300px, 0, 0) rotate(0deg); opacity: 0; }
}

@keyframes memeSlideRight {
  0% { transform: translate3d(300px, 0, 0) rotate(0deg); opacity: 0; }
  15% { transform: translate3d(-50px, 0, 0) rotate(10deg); opacity: 1; }
  30% { transform: translate3d(-50px, 100px, 0) rotate(10deg); opacity: 1; } 
  45% { transform: translate3d(-50px, -100px, 0) rotate(10deg); opacity: 1; } 
  60% { transform: translate3d(-50px, 100px, 0) rotate(10deg); opacity: 1; } 
  75% { transform: translate3d(-50px, 0, 0) rotate(10deg); opacity: 1; }
  85% { transform: translate3d(-50px, 0, 0) rotate(10deg); opacity: 1; }
  100% { transform: translate3d(300px, 0, 0) rotate(0deg); opacity: 0; }
}

/* Jump Dropdown */
.jump-dropdown {
  background: var(--dark);
  color: var(--grey-light);
  border: 1px solid var(--grey);
  padding: 10px 14px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  margin-bottom: 1px;
  outline: none;
  transition: border-color 0.2s;
}

.jump-dropdown:hover, .jump-dropdown:focus {
  border-color: var(--blurple);
}