html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* ✅ Prevents horizontal scroll */
  max-width: 100vw;   /* ✅ Prevents layout from exceeding viewport width */
  box-sizing: border-box;
}


/* === Bear Blog Base Theme Variables === */
:root {
  --accent: #2337ff;
  --accent-dark: #000d8a;
  --black: 15, 18, 25;
  --gray: 96, 115, 159;
  --gray-light: 229, 233, 240;
  --gray-dark: 34, 41, 57;
  --gray-gradient: rgba(var(--gray-light), 50%), #fff;
  --box-shadow: 0 2px 6px rgba(var(--gray), 25%), 0 8px 24px rgba(var(--gray), 33%), 0 16px 32px rgba(var(--gray), 33%);
}

/* === Top Navigation Bar === */
.topbar {
  background-color: #ffffff;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 4px;
  height: 30px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.search-icon-button {
  width: 34px;
  height: 34px;
  object-fit: contain;
  cursor: pointer;
  margin: 0 6px;
  padding: 4px;
  background: none;
  border: none;
}

.topnav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0;
}




/* Left logo */
.left-logo .logo {
  height: 50px;
  object-fit: contain;
}

.logo {
  height: 50px;
  object-fit: contain;
  display: block;
}


/* Right controls */
.right-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.search-icon {
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  padding: 0px 8px;
}

.search-input {
  padding: 6px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.category-dropdown {
  margin-left: 10px;
  padding: 6px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Shared dropdown container */
.dropdown-menu,
.dropdown-list {
  position: absolute;
  top: 100%;
  right: 0; /* 👈 ensures dropdown opens to the left */
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1001;
  min-width: 200px;
  margin-top: 6px;
}

/* Make category list scrollable if too long */
.dropdown-list {
  max-height: 280px;       /* 👈 limit height */
  overflow-y: auto;        /* 👈 enable scroll */
}

/* Dropdown item style */
.dropdown-item,
.menu-link {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-item:hover,
.menu-link:hover {
  background-color: #f5f5f5;
}

/* Search input styling inside dropdown */
.dropdown-input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
}

/* Button style for login/logout */
.menu-button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  text-align: left;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
}

.menu-button:hover {
  background-color: #f5f5f5;
}



/* === Fonts === */
@font-face {
  font-family: 'Atkinson';
  src: url('/fonts/atkinson-regular.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson';
  src: url('/fonts/atkinson-bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === Base Elements === */
body {
  font-family: 'Atkinson', sans-serif;
  margin: 0;
  padding: 0;
  text-align: left;
  background: linear-gradient(var(--gray-gradient)) no-repeat;
  background-size: 100% 600px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: rgb(var(--gray-dark));
  font-size: 13px;
  line-height: 1.4;
}

main {
  width: 720px;
  max-width: calc(100% - 2em);
  margin: auto;
  padding: 3em 1em;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5rem 0;
  color: rgb(var(--black));
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}
h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
}

strong, b { font-weight: 700; }

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent);
}

p {
  margin: 4px 0;
  line-height: 1.3;
  font-size: 13px;
}

textarea,
input {
  font-size: 16px;
  width: 100%;
}

table {
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

code {
  padding: 2px 5px;
  background-color: rgb(var(--gray-light));
  border-radius: 2px;
}
pre {
  padding: 1.5em;
  border-radius: 8px;
}
pre > code {
  all: unset;
}

blockquote {
  border-left: 4px solid var(--accent);
  padding: 0 0 0 20px;
  margin: 0px;
  font-size: 1.333em;
}

hr {
  border: none;
  border-top: 1px solid rgb(var(--gray-light));
}

/* === Responsive Typography Fixes === */
@media (max-width: 720px) {
  body {
    font-size: 15px;
  }
}

/* === TopNav Layout in CategoryPage to match Home === */
.page-container {
  max-width: 1024px;
  margin: 0 auto;
}


/* === Profile & Card Layout === */
.card-container,
.profile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 1rem;
}

.profile-img {
  width: 200px !important;
  height: 200px !important;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}

.profile-card,
.top-card {
  width: 200px;
  box-sizing: border-box;
  text-align: center;
  padding: 6px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  font-size: 13px;
}

.profile-card .name {
  font-size: 15px;
  font-weight: 700;
  margin: 8px 0 2px;
  color: #111;
}

.profile-card .company {
  font-weight: 700;
  color: #444;
  margin-bottom: 8px;
}

.profile-card .title {
  font-weight: 400;
  color: #666;
  font-size: 12.5px;
  margin: 4px 0 8px;
  line-height: 1.35;
}


.profile-card p,
.top-card p {
  margin: 4px 0;
  line-height: 1.3;
  font-size: 13px;
}

.profile-card strong,
.top-card strong {
  font-weight: bold;
}

.vote-buttons {
  display: flex;
  justify-content: center;
  margin-top: 4px;
  margin-bottom: 5px; /* 👈 extra space before job title */
}

.vote-button {
  background: none;
  border: none;
  font-size: 36px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}

.vote-button:hover {
  transform: scale(1.3);
}

/* Tooltip styling */
.vote-button::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #222;
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.vote-button:hover::after {
  opacity: 1;
}


.title,
.company {
  font-size: clamp(0.75rem, 1vw, 1rem); /* scale between 12px and 16px */
  line-height: 1.2;
  max-height: 2.6em; /* about 2 lines of text */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;  /* limit to 2 lines */
  -webkit-box-orient: vertical;
}


.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background-color: white;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1000;
}

@media (min-width: 600px) {
  .header {
    flex-direction: row;
    justify-content: space-between;
    padding: 16px 24px;
  }

  .card-container,
  .profile-grid {
    justify-content: flex-start;
  }
}

.card-skeleton {
  width: 200px;
  height: 250px;
  background-color: #e0e0e0;
  border-radius: 8px;
  animation: pulse 1.2s infinite ease-in-out;
  margin: 10px;
}
.skeleton-wrapper {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
@keyframes pulse {
  0% { background-color: #e0e0e0; }
  50% { background-color: #f0f0f0; }
  100% { background-color: #e0e0e0; }
}

.sr-only {
  border: 0;
  padding: 0;
  margin: 0;
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.top-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1280px) {
  .profile-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.top-card {
  background: #f0f0f0;
  border: 2px solid black;
  padding: 1rem;
  text-align: center;

}

h1, h2, h3, h4, h5, h6,
p, a, li, div, span {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 16px;
  margin-top: 80px;
}

.card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-3px);
}

.card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 10px;
}

.card .name {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 4px;
}

.card .title,
.card .company {
  font-size: 14px;
  color: #666;
  text-align: center;
}

.top-card {
  margin-top: 10px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.top-card .name {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 6px;
}

.top-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

