—

/*  Header & Navigation  */
.site-header {
  position: sticky;
  z-index: 100;
}

/* Portfolio admin: tiny edit icon (SVG only) at bottom-right */
.pf-edit-ico {
  position: absolute;
  bottom: 8px;
  right: 8px;
  color: #1672E6;
  background: transparent;
  border: none;
  padding: 2px;
  line-height: 1;
  opacity: .95;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: .25s transform, .25s color;
  cursor: pointer;
}

.pf-edit-ico svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
}

.pf-edit-ico:hover {
  transform: translateY(-3px) scale(1.08);
  color: #0d5ec2;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  position: relative;
}

.brand {
  font-weight: 700;
  letter-spacing: .4px;
  color: #1672E6;
  text-decoration: none;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo-mark {
  background: #1672E6;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: Poppins, system-ui, sans-serif;
}

.logo-text {
  font-weight: 700;
  letter-spacing: .4px;
  color: #1672E6;
  font-size: 18px;
}

/* main-nav styles consolidated below */
/* ===== Header menu redesign (exclude Upload STL) ===== */
.main-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.main-nav a:not(.upload-stl) {
  font-family: 'Comfortaa', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: .4px;
  color: #1f2937;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 14px;
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  /* avoid layout shift when hovering */
  transition:
    color .22s cubic-bezier(.4, 1.3, .6, 1),
    background .22s cubic-bezier(.4, 1.3, .6, 1),
    box-shadow .22s cubic-bezier(.4, 1.3, .6, 1),
    transform .18s cubic-bezier(.4, 1.3, .6, 1),
    border-color .22s ease;
}

.main-nav a:not(.upload-stl)::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 6px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #1672E6 0%, #1E90FF 100%);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .28s cubic-bezier(.4, 1.3, .6, 1);
  opacity: .9;
}

.main-nav a:not(.upload-stl):hover,
.main-nav a:not(.upload-stl):focus-visible {
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
  color: #1672E6;
  border-color: rgba(22, 114, 230, .28);
  box-shadow: 0 8px 28px -10px rgba(22, 114, 230, .35);
  transform: translateY(-2px);
}

.main-nav a:not(.upload-stl):hover::after,
.main-nav a:not(.upload-stl):focus-visible::after {
  transform: scaleX(1);
}

.main-nav a:not(.upload-stl).active {
  background: linear-gradient(90deg, #1672E6 0%, #1E90FF 100%);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 10px 34px -10px rgba(22, 114, 230, .55);
}

.main-nav a:not(.upload-stl).active::after {
  display: none;
}

.main-nav a:not(.upload-stl):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 114, 230, .2), 0 8px 28px -10px rgba(22, 114, 230, .35);
}

@media (max-width: 800px) {
  .main-nav {
    gap: 10px;
  }

  .main-nav a:not(.upload-stl) {
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 10px;
  }
}


/* nav-user base: neutral so mobile/desktop can diverge cleanly */
.nav-user {
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 50;
}

/* Desktop (PC) style 1 */
@media (min-width:801px) {
  .nav-user[data-user-widget] {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    padding: 3px 6px;
    border-radius: 16px;
    background: rgba(15, 116, 230, 0.1);
    border: 1px solid rgba(15, 116, 230, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .nav-user[data-user-widget] .nav-user-name {
    color: #0F74E6;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    font-size: 11px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-user[data-user-widget] .nav-user-logout {
    padding: 3px 8px !important;
    border-radius: 12px !important;
    background: #0F74E6 !important;
    color: #fff !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-size: 10px !important;
    transition: background .2s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
  }

  .nav-user[data-user-widget] .nav-user-logout:hover {
    background: #0B61C4 !important;
    color: #fff !important;
  }
}

@media (max-width:768px) {
  .nav-toggle {
    display: flex !important
  }
}

/*  Logo  */
.logo-svg,
.logo-compact {
  display: block;
  height: 80px;
  width: auto;
}

.logo-svg.footer {
  height: 60px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
}

.admin-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 20px;
  text-align: center;
}

.admin-logo .logo-svg {
  height: 100px;
  width: auto;
}

@media (max-width:900px) {
  .admin-logo .logo-svg {
    height: 86px;
  }
}

@media (max-width:520px) {
  .admin-logo .logo-svg {
    height: 78px;
  }
}

/*  Upload STL Button  */
/* Nút Upload STL n—"i bật trên header */
.main-nav a.upload-stl {
  background: linear-gradient(90deg, #1672E6 70%, #1E90FF 100%);
  color: #fff !important;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 4px 18px -6px #1672E6a0;
  padding: 8px 18px 8px 38px;
  position: relative;
  transition: box-shadow .22s, transform .18s, background .22s;
  letter-spacing: .5px;
  overflow: hidden;
}

.main-nav a.upload-stl:before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.92;
}

.main-nav a.upload-stl:hover,
.main-nav a.upload-stl:focus {
  background: linear-gradient(90deg, #1E90FF 70%, #1672E6 100%);
  box-shadow: 0 8px 32px -8px #1672E6cc;
  transform: scale(1.045) translateY(-2px);
  animation: pulseUpload .5s;
}

@keyframes pulseUpload {
  0% {
    box-shadow: 0 4px 18px -6px #1672E6a0;
  }

  50% {
    box-shadow: 0 12px 40px -10px #1E90FFa0;
  }

  100% {
    box-shadow: 0 8px 32px -8px #1672E6cc;
  }
}

.upload-stl {
  position: relative;
  padding-left: 38px !important;
}

.upload-stl .upload-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: inline-block;
  pointer-events: none;
}

.upload-stl .upload-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}


/*  Sign In Nav Button  */
/* ———— Sign In Nav Button —————————————————————————————————————————————————————————————————————————————— */
.nav-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(22, 114, 230, .09);
  border: 1.5px solid rgba(22, 114, 230, .25);
  color: #1672E6 !important;
  font-weight: 700 !important;
  font-size: 13px;
  border-radius: 10px;
  padding: 7px 16px !important;
  text-decoration: none;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .18s;
  letter-spacing: .2px;
  cursor: pointer;
}

.nav-signin-btn::after {
  display: none !important;
}

.nav-signin-btn:hover,
.nav-signin-btn:focus-visible {
  background: rgba(22, 114, 230, .16) !important;
  border-color: #1672E6 !important;
  box-shadow: 0 4px 14px rgba(22, 114, 230, .22);
  transform: translateY(-2px) !important;
}

/* nav-user-name as anchor (dashboard link) */
.nav-user[data-user-widget] .nav-user-name[href] {
  text-decoration: none;
}

.nav-user[data-user-widget] .nav-user-name[href]:hover {
  text-decoration: underline;
}

/*  Nav User Dropdown  */
/* ———— nav-user-dropdown: Avatar pill + hover dropdown —————————————————————— */
.nav-user-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 200;
}

.nav-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 5px;
  border-radius: 30px;
  background: rgba(22, 114, 230, 0.08);
  border: 1.5px solid rgba(22, 114, 230, 0.22);
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}

.nav-avatar-btn:hover,
.nav-user-dropdown.open .nav-avatar-btn {
  background: rgba(22, 114, 230, 0.14);
  border-color: rgba(22, 114, 230, 0.45);
  box-shadow: 0 4px 16px rgba(22, 114, 230, 0.18);
}

.nav-avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1672E6, #1a52cc);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(22, 114, 230, .3);
}

.nav-avatar-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-avatar-chevron {
  color: #1672E6;
  transition: transform .2s ease;
  flex-shrink: 0;
}

.nav-user-dropdown.open .nav-avatar-chevron {
  transform: rotate(180deg);
}

/* Dropdown card */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(22, 114, 230, 0.12);
  border-radius: 16px;
  box-shadow: 0 12px 40px -8px rgba(22, 114, 230, 0.2), 0 4px 16px rgba(0, 0, 0, .08);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  pointer-events: none;
}

.nav-user-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header row inside dropdown */
.nav-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.nav-dropdown-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1672E6, #1a52cc);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(22, 114, 230, .3);
}

.nav-dropdown-fullname {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.nav-dropdown-email {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* Divider */
.nav-dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 4px 0;
}

/* Menu items */
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.nav-dropdown-item svg {
  color: #94a3b8;
  flex-shrink: 0;
  transition: color .15s;
}

.nav-dropdown-item:hover {
  background: #f0f7ff;
  color: #1672E6;
}

.nav-dropdown-item:hover svg {
  color: #1672E6;
}

/* Sign Out: danger style */
.nav-dropdown-logout {
  color: #dc2626;
}

.nav-dropdown-logout svg {
  color: #fca5a5;
}

.nav-dropdown-logout:hover {
  background: #fff5f5;
  color: #dc2626;
}

.nav-dropdown-logout:hover svg {
  color: #dc2626;
}

/* Dark mode */
.dark .nav-avatar-btn {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
}

.dark .nav-avatar-name {
  color: #f1f5f9;
}

.dark .nav-dropdown-menu {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .5);
}

.dark .nav-dropdown-fullname {
  color: #f1f5f9;
}

.dark .nav-dropdown-divider {
  background: #334155;
}

.dark .nav-dropdown-item {
  color: #cbd5e1;
}

.dark .nav-dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

/* Mobile: full width dropdown */
@media (max-width: 800px) {
  .nav-user-dropdown {
    position: fixed;
    top: 10px;
    right: 12px;
    z-index: 1500;
  }

  .nav-dropdown-menu {
    right: 0;
    min-width: 200px;
  }
}


/*  Mobile Header  */
@media(max-width:800px) {
  .header-inner {
    padding: 10px 8px
  }

  .main-nav a {
    display: none
  }

  .nav-toggle {
    display: inline-block
  }

  .hero-inner {
    padding: 8px
  }

  .about-grid {
    grid-template-columns: 1fr
  }
}