/* Shared base and navbar styles for blog and subpages */
:root {
  --primary: #3182ce;
  --primary-hover: #2c5282;
  --secondary: #5046e5;
  --accent: #d3e8ee;
  --bg-body: rgb(15, 18, 25);
  --bg-elevated: #1a1f2e;
  --bg-card: rgb(30, 40, 51);
  --bg-card-hover: #1f2937;
  --bg-header: rgb(21, 32, 43);
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-tertiary: #718096;
  --border: #2d3748;
  --success: #48bb78;
  --error: #f56565;
  --warning: #ecc94b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
  z-index: 1200;
}
.skip-link:focus {
  transform: translateY(0);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  outline: none;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-weight: 700;
  font-size: 28px;
  color: var(--text-primary);
  display: flex;
  align-items: flex-end;
  text-decoration: none;
}
.logo:hover {
  color: var(--text-primary);
  text-decoration: none;
}
.logo:hover .logo-main {
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.logo-main {
  font-size: 36px;
  line-height: 1;
  padding-bottom: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.logo-by {
  font-size: 14px;
  font-variant: small-caps;
  font-weight: 400;
  margin-left: 4px;
  opacity: 0.8;
  line-height: 1;
  padding-bottom: 0;
}
.logo img {
  height: 40px;
  margin-right: 10px;
}

.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  padding: 0;
  border-bottom: none;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
  margin: 0;
}
.nav-links li {
  display: inline-block;
  padding: 8px 0;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text-primary);
}
.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  margin-left: 10px;
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.2);
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover {
  background: var(--primary-hover);
  color: #fff;
}

.hamburger {
  display: none;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    width: 32px;
    height: 32px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 22px;
    z-index: 1100;
  }
  .hamburger span {
    display: block;
    width: 100%;
    height: 4px;
    background: var(--primary);
    margin: 6px 0;
    border-radius: 2px;
    transition: 0.3s;
  }
  .nav-links {
    display: none !important;
    flex-direction: column;
    gap: 0;
    width: 100vw;
    background: var(--bg-header);
    position: absolute;
    top: 60px;
    left: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 16px 0 20px 0;
    z-index: 1001;
    border-bottom: 1px solid var(--border);
    align-items: center;
  }
  .nav-links.open {
    display: flex !important;
  }
  .nav-links li {
    padding: 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child {
    border-bottom: none;
    padding-top: 16px;
    padding-bottom: 8px;
  }
  .nav-links a {
    font-size: 16px;
    display: block;
    padding: 16px 24px;
    color: var(--text-secondary);
  }
  .nav-links a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
  }
  .nav-links .nav-cta {
    display: inline-block;
    padding: 12px 32px;
    margin: 0 auto;
  }
  .navbar .container {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 10px;
  }
}
