:root {
  --primary: #F9F9FA;
  --accent: #f53333;
  --text: #1E1E2F;
  --secondary: #2C2C3E;
}

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

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--text);
  color: var(--primary);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 1000;
  padding: 0 5rem;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  align-items: center;
  height: 100px;
}

.landing-page-container-codemate-logo {
  flex: 1;
  display: flex;
  align-items: center;
}

.landing-page-container-codemate-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.navbar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: inherit;
}

.nav-link:hover { color: var(--accent); }

.header-profile {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-profile-pic {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: block;
  border: 2px solid #fff;
  cursor: pointer;
}

.dropdown {
  position: absolute;
  top: 80px;
  right: 5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  width: 220px;
  display: none;
  z-index: 1001;
  padding: 0.8rem 0.5rem;
}

.dropdown.show { display: block; }

.dropdown a {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
  cursor: pointer;
}

.dropdown a:hover { background: #f0f0f0; }
.dropdown a i { margin-right: 10px; color: #666; }
hr { margin: 0.5rem 0.7rem; }

/* ===== HAMBURGER ===== */
.topnav {
  display: none;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-icon {
  width: 28px;
  height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.menu-icon span {
  background-color: white;
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-icon.active .bar1 { transform: translateY(9px) rotate(45deg); }
.menu-icon.active .bar2 { opacity: 0; transform: scaleX(0); }
.menu-icon.active .bar3 { transform: translateY(-9px) rotate(-45deg); }

#myLinks {
  display: none;
  position: fixed;
  top: 100px;
  left: 0;
  width: 100%;
  background: #1E1E2F;
  z-index: 998;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#myLinks.show { display: flex; }

#myLinks a {
  padding: 1rem 2rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.2s;
}

#myLinks a:hover { background: rgba(255,255,255,0.05); }

/* ===== HEADER RESPONSIVE ===== */
@media (min-width: 1000px) and (max-width: 1406px) {
  .header { padding: 0 2rem; }
  .navbar { flex-wrap: nowrap; white-space: nowrap; gap: 15px; }
}

@media (max-width: 1000px) {
  .header { padding: 0 1rem; padding-left: 2rem; }
  .navbar { flex-wrap: nowrap; white-space: nowrap; gap: 15px; }
  .landing-page-container-codemate-logo { flex: 0 0 250px; margin-right: 2rem; }
  .landing-page-container-codemate-logo a span { font-size: 1.5rem !important; }
  .landing-page-container-codemate-logo a img { height: 48px !important; width: 48px !important; }
}

@media (max-width: 1024px) {
  .header { padding: 0 2rem; }
  .dropdown { right: 2rem; }
  .landing-page-container-codemate-logo a span { font-size: 1.4rem !important; }
}

@media (max-width: 900px) {
  .landing-page-container-codemate-logo { margin-right: 0.5rem; }
}

@media (max-width: 850px) {
  .header { padding: 0 1.2rem; height: 70px; }
  .landing-page-container-codemate-logo { flex: 1; }
  .navbar { display: none; }
  .header-profile { flex: 0; margin-right: 1rem; }
  .topnav { display: flex; }
  #myLinks { top: 70px; }
  .dropdown { right: 1rem; top: 60px; }
}

@media (max-width: 480px) {
  .header { padding: 0 1rem; }
}

/* ===== PAGE LAYOUT ===== */
.page-layout {
  display: grid;
  grid-template-columns: 450px minmax(0, 600px) 1fr;
  gap: 2rem;
  padding: 0 1rem;
  padding-top: 100px;
}

.blog {
  max-width: none;
  margin: 0;
}

.sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
  margin-left: 100px;
}

.sidebar .donation-cta {
  margin: 0;
  padding: 1.5rem;
  font-size: 0.9rem;
}

.sidebar .cta-content h3 { font-size: 1.2rem; }
.sidebar .cta-content p { font-size: 0.95rem; }

.donation-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem 0;
  color: white;
  text-align: center;
  width: 100%;
  max-width: 500px;
}

.cta-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.cta-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.donate-btn.primary { background-color: #d43333; color: white; }
.donate-btn.primary:hover {
  background-color: #e02828;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 51, 51, 0.3);
}

.donate-btn.secondary {
  background-color: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}
.donate-btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.donate-btn i { font-size: 1rem; }

/* ===== BLOG CONTENT ===== */
.blog-header {
  text-align: left;
  margin-bottom: 3.5rem;
  padding-top: 1.5rem;
}

.blog-heading {
  font-size: 2.5rem;
  color: black;
  font-weight: 800;
  padding-top: 0;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 0.1rem;
}

p { font-size: 1.125rem; }
h2 { font-size: 2rem; font-weight: 750; }

.share-section { padding: 1.5rem 0; }

.share-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #333;
  font-weight: 600;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  color: white;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.share-btn i { font-size: 18px; }

.twitter { background-color: #000000; }
.facebook { background-color: #4267b2; }
.linkedin { background-color: #0077b5; }
.reddit { background-color: #ff4500; }
.email { background-color: #34495e; }
.copy-link { background-color: #95a5a6; }

.twitter:hover { background-color: #222020; }
.facebook:hover { background-color: #365899; }
.linkedin:hover { background-color: #005885; }
.reddit:hover { background-color: #cc3600; }
.email:hover { background-color: #2c3e50; }
.copy-link:hover { background-color: #7f8c8d; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #6b7beb;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: background 0.2s;
  margin-top: 1rem;
}

.back-btn:hover { background: #5a6ad4; }

/* ===== DONATE CTA MOBILE ===== */
@media (max-width: 500px) {
  .donation-cta { padding: 1.5rem; margin: 2rem 0; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .donate-btn { width: 100%; max-width: 250px; justify-content: center; }
}

/* ===== PAGE LAYOUT RESPONSIVE ===== */
@media (max-width: 850px) {
  .page-layout {
    display: block;
    padding: 0 1.25rem;
    padding-top: 90px;
  }

  .page-layout > div:first-child { display: none; }

  .blog { width: 100%; }

  .blog-heading { font-size: 1.8rem; }

  .blog-header { padding-top: 0; }

  .share-buttons { flex-direction: row; flex-wrap: wrap; }

  .sidebar {
    position: static;
    margin: 2rem 0 0 0;
    width: 100%;
  }

  .sidebar .donation-cta {
    max-width: none;
    margin-top: 2rem;
  }
}

@media (max-width: 500px) {
  .blog-heading { font-size: 1.5rem; }
  .blog-meta { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
}