/* ============================================================
   TECHFREELA — layout.css
   Navegação, Páginas, Hero, Seções, Profile, Grid geral
   ============================================================ */

/* ---- NAVIGATION ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--accent);
  letter-spacing: -0.5px;
  cursor: pointer;
  user-select: none;
}
.nav-logo span { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
  user-select: none;
}
.nav-avatar:hover { transform: scale(1.05); }

/* ---- PAGES ---- */
.page {
  display: none;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 64px);
  animation: fadeInUp 0.3s ease;
}
.page.active { display: block; }

/* ---- SECTION WRAPPER ---- */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-sm { padding: 3rem 2rem; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,245,196,0.07);
  border: 1px solid rgba(0,245,196,0.18);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 1.25rem;
  letter-spacing: 0.5px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.section-sub {
  color: var(--text2);
  font-size: 1rem;
  margin-bottom: 3rem;
}

/* ---- HERO ---- */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,245,196,0.07) 0%, transparent 68%);
  pointer-events: none;
  user-select: none;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: 1.03;
  max-width: 820px;
  margin-bottom: 1.5rem;
  letter-spacing: -2.5px;
}

.hero h1 .hl  { color: var(--accent); }
.hero h1 .hl2 { color: var(--accent4); }

.hero-desc {
  font-size: 1.15rem;
  color: var(--text2);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stats {
  display: flex;
  gap: 3.5rem;
  margin-top: 5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stat { text-align: center; }

.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  color: var(--text);
  letter-spacing: -1px;
}
.stat-num span { color: var(--accent); }

.stat-label {
  font-size: 0.72rem;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-top: 0.3rem;
  letter-spacing: 1px;
}

/* ---- HOW IT WORKS ---- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.how-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.how-icon { font-size: 2.25rem; margin-bottom: 1rem; }

.how-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.how-card p { color: var(--text2); font-size: 0.875rem; line-height: 1.65; }

/* ---- COST TABLE ---- */
.cost-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}

.cost-table-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text3);
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.cost-table-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -1px;
  line-height: 1.2;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.cost-row:last-child { border-bottom: none; }
.cost-row-label { color: var(--text2); }
.cost-row-val {
  font-family: var(--font-mono);
  color: var(--accent3);
  font-size: 0.8rem;
}

/* ---- JOB BOARD ---- */
.job-board-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  color: var(--text);
  transition: var(--trans-fast);
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text3); }

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  color: var(--text);
  cursor: pointer;
  transition: var(--trans-fast);
  font-family: var(--font-body);
  font-size: 0.875rem;
}
.filter-select:focus { border-color: var(--accent); }
.filter-select option { background: var(--bg3); }

.jobs-list { display: flex; flex-direction: column; gap: 1rem; }

.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  cursor: pointer;
  transition: var(--trans-normal);
  position: relative;
  overflow: hidden;
}

.job-card:hover {
  border-color: var(--border2);
  transform: translateX(5px);
}

.job-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.job-info h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.job-company {
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 0.65rem;
}

.job-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.job-meta { text-align: right; min-width: 130px; }

.job-salary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.job-type-badge { font-size: 0.78rem; color: var(--text3); font-family: var(--font-mono); }
.job-posted     { font-size: 0.72rem; color: var(--text3); margin-top: 0.4rem; }

.job-credits-cost {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--accent3);
  font-family: var(--font-mono);
  margin-top: 0.5rem;
  justify-content: flex-end;
}

/* ---- JOB DETAIL ---- */
.job-detail-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.job-detail-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.job-detail-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  margin-bottom: 0.2rem;
}

.job-detail-company { color: var(--accent); font-family: var(--font-mono); font-size: 0.85rem; }

.job-detail-salary-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.job-detail-section { margin-bottom: 1.5rem; }

.job-detail-section h4 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.job-detail-section p,
.job-detail-section li { color: var(--text2); font-size: 0.9rem; line-height: 1.7; }
.job-detail-section ul { padding-left: 1.25rem; list-style: disc; }
.job-detail-section li { margin-bottom: 0.3rem; }

.apply-cost-box {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

/* ---- POST JOB PAGE ---- */
.post-hero {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 3rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.post-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.post-hero h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.post-hero p { color: var(--text2); max-width: 460px; margin: 0 auto 1.5rem; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem;
}

.form-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  margin-bottom: 2rem;
}

/* ---- PRICING ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem;
  text-align: center;
  transition: var(--trans-normal);
  position: relative;
  overflow: hidden;
}

.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(160deg, #0d1f1a 0%, var(--surface) 100%);
}

.pricing-card.featured::after {
  content: 'MAIS POPULAR';
  position: absolute;
  top: 1.25rem; right: -2.25rem;
  background: var(--accent);
  color: #000;
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.3rem 3.5rem;
  transform: rotate(45deg);
  letter-spacing: 1px;
}

.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.pricing-credits {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.25rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.pricing-credits small { font-size: 1.5rem; }

.pricing-credits-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text2);
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.pricing-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.85rem;
  margin-bottom: 1.5rem;
}
.pricing-price small { font-size: 0.9rem; color: var(--text2); font-weight: 400; }

.pricing-features { margin-bottom: 1.5rem; text-align: left; }

.pricing-features li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.875rem;
  color: var(--text2);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-check { color: var(--accent); flex-shrink: 0; }

/* ---- PROFILE ---- */
.profile-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 800;
  color: white;
  user-select: none;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: inherit;
}
.profile-avatar:hover .profile-avatar-overlay { opacity: 1; }

.profile-info { flex: 1; min-width: 200px; }

.profile-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}

.profile-role {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

.profile-bio {
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 520px;
}

.profile-credits-box {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  text-align: center;
  min-width: 130px;
}

.profile-credits-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  color: var(--accent3);
}

.profile-credits-label {
  font-size: 0.72rem;
  color: var(--text3);
  font-family: var(--font-mono);
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

.profile-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

/* Experience */
.exp-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.exp-item:last-child { border-bottom: none; }

.exp-title    { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.2rem; }
.exp-company  { color: var(--accent); font-size: 0.82rem; font-family: var(--font-mono); margin-bottom: 0.25rem; }
.exp-period   { font-size: 0.78rem; color: var(--text3); margin-bottom: 0.5rem; }
.exp-desc     { font-size: 0.875rem; color: var(--text2); line-height: 1.6; }

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.portfolio-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem;
  cursor: pointer;
  transition: var(--trans-normal);
}
.portfolio-item:hover { border-color: var(--accent); transform: scale(1.02); }

.portfolio-item-icon  { font-size: 1.5rem; margin-bottom: 0.5rem; }
.portfolio-item-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; }
.portfolio-item-desc  { font-size: 0.75rem; color: var(--text3); }

/* ---- FOOTER ---- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 2rem;
  text-align: center;
  color: var(--text3);
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
}

.footer a { color: var(--accent); }
.footer span { color: var(--text2); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .section { padding: 3rem 1rem; }
  .hero { padding: 3rem 1rem; }
  .hero-stats { gap: 2rem; }

  .job-card {
    grid-template-columns: auto 1fr;
  }
  .job-meta { display: none; }

  .post-hero { padding: 2rem 1.5rem; }
  .post-hero h2 { font-size: 1.75rem; }

  .portfolio-grid { grid-template-columns: 1fr; }

  .cost-table-wrap { padding: 1.5rem; }

  .modal { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .nav-logo { font-size: 1.2rem; }
  .hero h1  { font-size: 2rem; letter-spacing: -1px; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .profile-header { flex-direction: column; }
  .pricing-grid { grid-template-columns: 1fr; }
}












 /* =====================================================
       RESPONSIVE OVERRIDES + HAMBURGER MENU
       ===================================================== */

    @media (min-width: 769px) {

      /* O container do menu precisa ficar em linha */
      #nav-links.drawer{
        position: static;              /* garante que não herde comportamento do mobile */
        transform: none;
        visibility: visible;
        width: auto;
        height: auto;
        background: transparent;
        border: none;
        box-shadow: none;

        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.6rem;

        padding: 0;                    /* evita “descer” conteúdo */
        overflow: visible;
        flex-wrap: nowrap;             /* <<< evita quebrar linha */
      }

      /* As opções dentro do menu ficam alinhadas em linha também */
      #nav-links .drawer-content{
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.6rem;
        overflow: visible;
        flex-wrap: nowrap;             /* <<< evita quebrar */
        white-space: nowrap;           /* <<< impede quebra em textos */
        padding: 0;
      }

      /* Garante que o avatar não vá pra baixo */
      #nav-links .nav-avatar-wrap{
        display: flex;
        align-items: center;
        flex-shrink: 0;
      }
    }

    /* ── Hamburger button ── */
    .nav-hamburger {
      display: none;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      width: 40px;
      height: 40px;
      padding: 8px;
      background: none;
      border: none;
      cursor: pointer;
      z-index: 201;
      flex-shrink: 0;
    }
    .nav-hamburger span {
      display: block;
      width: 22px;
      height: 2px;
      background: var(--text, #fff);
      border-radius: 2px;
      transition: all 0.28s ease;
      transform-origin: center;
    }
    .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* ── Mobile overlay ── */
    .mobile-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      backdrop-filter: blur(4px);
      z-index: 198;
    }
    .mobile-overlay.open { display: block; }

    /* Drawer header hidden on desktop — only visible inside mobile drawer */
    .drawer-header { display: none !important; }
    .drawer-close  { display: none !important; }

    /* ── User dropdown menu ── */
    .nav-avatar-wrap { position: relative; }

    .user-dropdown {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      min-width: 220px;
      max-height: 500px;
      background: var(--surface2, #1a1a2e);
      border: 1px solid var(--border2, rgba(255,255,255,0.1));
      border-radius: 14px;
      box-shadow: 0 16px 40px rgba(0,0,0,0.4);
      z-index: 9999;
      overflow-y: auto;

      animation: dropdownIn .15s ease;
    }
    @keyframes dropdownIn {
      from { opacity:0; transform:translateY(-6px); }
      to   { opacity:1; transform:translateY(0); }
    }
    .user-dropdown-header { padding: 1rem 1.1rem 0.85rem; }
    .user-dropdown-divider {
      height: 1px;
      background: var(--border2, rgba(255,255,255,0.08));
      margin: 0.2rem 0;
    }
    .user-dropdown-item {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      width: 100%;
      padding: 0.65rem 1.1rem;
      background: none;
      border: none;
      color: var(--text2, #ccc);
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
      text-align: left;
      transition: background .12s, color .12s;
      font-family: inherit;
    }
    .user-dropdown-item:hover { background: rgba(255,255,255,0.06); color: var(--text1, #fff); }
    .user-dropdown-item-danger { color: #f87171 !important; }
    .user-dropdown-item-danger:hover { background: rgba(248,113,113,0.1) !important; }

    /* =====================================================
       MOBILE — 768px
       ===================================================== */
    @media (max-width: 768px) {

      /* Prevent horizontal scroll from hidden drawer */
      html, body { overflow-x: hidden; }

      /* Nav */
      .nav { padding: 0 1rem; }
      .nav-hamburger { display: flex; }

      /* Nav links become a slide-in drawer from the right */
      .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 100vw);
        background: var(--bg3, #0e0e1a);
        border-left: 1px solid var(--border2, rgba(255,255,255,0.1));
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        padding: 0 0.75rem 1.5rem;
        z-index: 200;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: -8px 0 32px rgba(0,0,0,0.5);
        visibility: hidden;
      }
      .nav-links.open {
        transform: translateX(0);
        visibility: visible;
      }

      .nav-links.drawer {
        display: flex;
        flex-direction: column;
      }

      .drawer-content {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 1rem;
      }

      .nav-hamburger{
        border-radius: 10px;
        transition: background .15s ease, transform .12s ease;
      }
      .nav-hamburger:hover{
        background: rgba(255,255,255,0.06);
      }
      .nav-hamburger:active{
        transform: scale(0.98);
      }
      .nav-hamburger:focus-visible{
        outline: 2px solid rgba(99,102,241,0.55);
        outline-offset: 2px;
      }

      /* Drawer header */
      .drawer-header {
        display: flex !important;
        justify-content: space-between;
        padding: 0 0.25rem;
        height: 64px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        background: var(--bg3, #0e0e1a);
        z-index: 1;
        margin: 0 -0.75rem;
        padding: 0 1rem;
        border-bottom: 1px solid var(--border2, rgba(255,255,255,0.08));
        margin-bottom: 0.5rem;
      }

      .drawer {
        height: 100vh;
        display: flex;
        flex-direction: column;
      }

      .drawer-content {
        flex: 1;
        overflow-y: auto;
      }

      .drawer-close {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: var(--surface, rgba(255,255,255,0.06));
        border: 1px solid var(--border, rgba(255,255,255,0.1));
        color: var(--text2, #ccc);
        font-size: 1rem;
        cursor: pointer;
        display: flex !important;
        align-items: center;
        justify-content: center;
      }
      .drawer-divider { display: none; }

      /* Buttons inside drawer go full width */
      .nav-links .btn-ghost {
        width: 100%;
        justify-content: flex-start;
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
        border-radius: 8px;
      }
      .nav-links .btn-ghost:hover { background: rgba(255,255,255,0.06); }

      .nav-links .btn-primary,
      .nav-links .btn-secondary {
        width: 100%;
        margin-top: 0.25rem;
        justify-content: center;
      }

      /* Avatar wrap inside drawer */
      .nav-avatar-wrap {
        margin-top: 0.5rem;
        width: 100%;
      }
      .nav-avatar {
        width: 100%;
        height: 44px;
        border-radius: 10px;
        font-size: 0.9rem;
        justify-content: center;
      }
      /* Dropdown becomes inline inside drawer */
      .user-dropdown {
        position: static;
        animation: none;
        box-shadow: none;
        border-radius: 10px;
        margin-top: 0.5rem;
        border: 1px solid var(--border, rgba(255,255,255,0.08));
      }

      /* Sections */
      .section { padding: 2.5rem 1rem; }
      .section-sm { padding: 1.5rem 1rem; }
      .hero { padding: 2.5rem 1rem; min-height: auto; }
      .hero-stats { gap: 1.5rem; margin-top: 3rem; }
      .hero-desc { font-size: 1rem; }

      /* Job cards */
      .job-card {
        grid-template-columns: auto 1fr;
        gap: 0.75rem 1rem;
      }
      .job-meta { display: none; }

      /* Post job */
      .post-hero { padding: 1.75rem 1.25rem; }
      .post-hero h2 { font-size: 1.5rem; }

      /* Portfolio */
      .portfolio-grid { grid-template-columns: 1fr; }

      /* Cost table */
      .cost-table-wrap { padding: 1.25rem; }

      /* Modal */
      .modal { padding: 1.5rem 1.25rem; border-radius: 18px; }
      .modal-title { font-size: 1.2rem; }
      .modal-wide { max-width: 100%; }

      /* Profile */
      .profile-header { flex-direction: column; align-items: stretch; }
      .profile-grid { grid-template-columns: 1fr; }
      .profile-credits-box { min-width: auto; }
      .profile-actions { gap: 0.5rem; }
      .profile-actions .btn { flex: 1; min-width: calc(50% - 0.25rem); justify-content: center; }

      /* Company panel tabs */
      .tab-switcher { flex-wrap: wrap; }
      .tab-btn { flex: none; font-size: 0.78rem; padding: 0.5rem 0.75rem; }

      /* Forms */
      .form-row { grid-template-columns: 1fr; }

      /* Toast */
      #toast { bottom: 1rem; right: 1rem; left: 1rem; max-width: none; }

      /* How grid */
      .how-grid { grid-template-columns: 1fr; gap: 1rem; }

      /* Pricing */
      .pricing-grid { grid-template-columns: 1fr; }

      /* Admin tabs */
      #admin-tabs { flex-wrap: wrap; gap: 0.4rem; }
      #admin-tabs .tab-btn { font-size: 0.78rem; padding: 0.45rem 0.65rem; }

      /* My applications stats */
      #myapp-stats { grid-template-columns: repeat(2, 1fr); }

      /* Company applicants stats bar */
      .how-grid#applicants-stats-bar { grid-template-columns: repeat(2, 1fr); }

      /* Candidate profile modal header flex */
      #candidate-profile-modal > .modal > div:first-of-type { flex-direction: column; }
    }

    /* =====================================================
       SMALL MOBILE — 480px
       ===================================================== */
    @media (max-width: 480px) {
      .nav-logo { font-size: 1.2rem; }
      .hero h1  { font-size: 2rem; letter-spacing: -1px; }
      .hero-btns { flex-direction: column; align-items: stretch; }

      .section-title { font-size: 1.6rem; }

      /* Job card compact */
      .job-logo { width: 40px; height: 40px; font-size: 1.2rem; }
      .job-info h3 { font-size: 0.92rem; }
      .job-company { font-size: 0.78rem; }
      .job-tags .tag { font-size: 0.68rem; }

      /* Profile header */
      .profile-avatar { width: 64px; height: 64px; font-size: 1.5rem; }
      .profile-name   { font-size: 1.3rem; }
      .profile-actions .btn { font-size: 0.75rem; padding: 0.4rem 0.5rem; }

      /* Modal full screen on very small */
      .modal-overlay { padding: 0; align-items: flex-end; }
      .modal {
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        width: 100%;
      }

      /* Company panel job card actions */
      #company-jobs-list .card > div { flex-direction: column; }

      /* My applications filter buttons wrap */
      #page-my-applications .btn-sm { font-size: 0.75rem; padding: 0.35rem 0.6rem; }

      /* Stats grid 2 cols */
      #myapp-stats { grid-template-columns: repeat(2, 1fr); }
    }

    /* =====================================================
       TABLET — 1024px
       ===================================================== */
    @media (max-width: 1024px) {
      .profile-grid { grid-template-columns: 1fr; }
      .how-grid { grid-template-columns: repeat(2, 1fr); }
    }
