
/* ThinkNaming Frontend Hotfix v2.2.1 */

/* Keep page backgrounds consistent */
body.tn-has-portfolio-dark,
body.tn-has-portfolio-dark #page,
body.tn-has-portfolio-dark .site,
body.tn-has-portfolio-dark .site-content,
body.tn-has-portfolio-dark #content,
body.tn-has-portfolio-dark .content-area,
body.tn-has-portfolio-dark .entry-content { background: #07111f !important; }

body.tn-has-portfolio-light,
body.tn-has-portfolio-light #page,
body.tn-has-portfolio-light .site,
body.tn-has-portfolio-light .site-content,
body.tn-has-portfolio-light #content,
body.tn-has-portfolio-light .content-area,
body.tn-has-portfolio-light .entry-content { background: #f7fbff !important; }

html body #tn-public-portfolio.theme-dark {
  background:
    radial-gradient(circle at 0 8%, rgba(93,149,255,.16), transparent 22%),
    radial-gradient(circle at 100% 14%, rgba(21,182,142,.08), transparent 18%),
    linear-gradient(180deg,#07111f 0%,#091525 50%,#07111f 100%) !important;
  color: #f6f9ff !important;
}

html body #tn-public-portfolio.theme-light {
  background:
    radial-gradient(circle at 0 10%, rgba(33,108,255,.10), transparent 22%),
    radial-gradient(circle at 100% 16%, rgba(33,108,255,.07), transparent 18%),
    linear-gradient(180deg,#f7fbff 0%,#ffffff 52%,#f7fbff 100%) !important;
  color: #0b1a30 !important;
}

/* SVG safety */
html body #tn-public-portfolio svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

/* Hide mobile controls on desktop */
html body #tn-public-portfolio .tn-mobile-menu-toggle,
html body #tn-public-portfolio .tn-mobile-theme-toggle,
html body #tn-public-portfolio .tn-mobile-actions,
html body #tn-public-portfolio .tn-mobile-menu-backdrop,
html body #tn-public-portfolio .tn-mobile-menu-panel {
  display: none !important;
}

/* Restore desktop header */
html body #tn-public-portfolio .tn-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  background: transparent !important;
  position: relative !important;
}

html body #tn-public-portfolio .tn-logo {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: 0 !important;
}

html body #tn-public-portfolio .tn-logo img {
  height: 54px !important;
  width: auto !important;
  max-width: 270px !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body #tn-public-portfolio .tn-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 24px !important;
}

/* Text and gradient */
html body #tn-public-portfolio.theme-dark .tn-hero h1,
html body #tn-public-portfolio.theme-dark .tn-nav a,
html body #tn-public-portfolio.theme-dark .tn-stat strong,
html body #tn-public-portfolio.theme-dark .tn-panel-head h2,
html body #tn-public-portfolio.theme-dark .tn-card h3,
html body #tn-public-portfolio.theme-dark .tn-cta h2,
html body #tn-public-portfolio.theme-dark .tn-contact-head h2 { color: #f6f9ff !important; }

html body #tn-public-portfolio.theme-light .tn-hero h1,
html body #tn-public-portfolio.theme-light .tn-nav a,
html body #tn-public-portfolio.theme-light .tn-stat strong,
html body #tn-public-portfolio.theme-light .tn-panel-head h2,
html body #tn-public-portfolio.theme-light .tn-card h3,
html body #tn-public-portfolio.theme-light .tn-cta h2,
html body #tn-public-portfolio.theme-light .tn-contact-head h2 { color: #0b1a30 !important; }

html body #tn-public-portfolio .tn-hero h1 span {
  background: linear-gradient(135deg,#216cff,#9ac3ff) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Icon fixes */
html body #tn-public-portfolio .tn-search .tn-inline-icon,
html body #tn-public-portfolio .tn-search .tn-inline-icon svg,
html body #tn-public-portfolio .tn-search > svg,
html body #tn-public-portfolio .tn-search svg {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  flex: 0 0 22px !important;
}

html body #tn-public-portfolio .tn-tab,
html body #tn-public-portfolio .tn-chip { gap: 9px !important; }

html body #tn-public-portfolio .tn-tab-icon,
html body #tn-public-portfolio .tn-chip-icon,
html body #tn-public-portfolio .tn-mode-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #5d95ff !important;
}

html body #tn-public-portfolio .tn-tab-icon,
html body #tn-public-portfolio .tn-chip-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
}

html body #tn-public-portfolio .tn-mode-icon {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
}

html body #tn-public-portfolio .tn-tab-icon svg,
html body #tn-public-portfolio .tn-chip-icon svg,
html body #tn-public-portfolio .tn-mode-icon svg {
  width: 100% !important;
  height: 100% !important;
}

/* Chips */
html body #tn-public-portfolio.theme-dark .tn-chip-row {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 22px 60px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04) !important;
}

html body #tn-public-portfolio.theme-dark .tn-chip {
  background: rgba(11,23,41,.88) !important;
  color: #f6f9ff !important;
  border: 1px solid rgba(255,255,255,.10) !important;
}

html body #tn-public-portfolio.theme-light .tn-chip {
  background: #ffffff !important;
  color: #0b1a30 !important;
  border: 1px solid #e7edf8 !important;
}

/* Mobile header: force ONE ROW */
@media (max-width: 991px) {
  html body #tn-public-portfolio {
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-bottom: 112px !important;
  }

  html body #tn-public-portfolio .tn-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 62px !important;
    height: auto !important;
    padding: 10px 0 10px !important;
    margin: 0 !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html body #tn-public-portfolio.theme-light .tn-header {
    border-bottom: 1px solid #dfe8f5 !important;
  }

  html body #tn-public-portfolio .tn-logo {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 104px) !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  html body #tn-public-portfolio .tn-logo img {
    height: 34px !important;
    width: auto !important;
    max-width: min(220px, calc(100vw - 132px)) !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body #tn-public-portfolio .tn-nav,
  html body #tn-public-portfolio .tn-theme-toggle {
    display: none !important;
  }

  html body #tn-public-portfolio .tn-mobile-actions {
    order: 2 !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    min-width: 96px !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-toggle,
  html body #tn-public-portfolio .tn-mobile-theme-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    padding: 0 !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    font-size: 0 !important;
    box-shadow: 0 10px 22px rgba(0,0,0,.10) !important;
  }

  html body #tn-public-portfolio.theme-dark .tn-mobile-menu-toggle,
  html body #tn-public-portfolio.theme-dark .tn-mobile-theme-toggle {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04)) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    color: #f6f9ff !important;
  }

  html body #tn-public-portfolio.theme-light .tn-mobile-menu-toggle,
  html body #tn-public-portfolio.theme-light .tn-mobile-theme-toggle {
    background: linear-gradient(180deg, #ffffff, #f3f7ff) !important;
    border: 1px solid #dde6f5 !important;
    color: #0b1a30 !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-toggle svg,
  html body #tn-public-portfolio .tn-mobile-theme-toggle svg {
    width: 19px !important;
    height: 19px !important;
  }

  /* Left drawer */
  html body #tn-public-portfolio .tn-mobile-menu-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(3,9,18,.52) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity .25s ease, visibility .25s ease !important;
    z-index: 10000 !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-panel {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    width: min(84vw, 360px) !important;
    transform: translateX(-104%) !important;
    transition: transform .32s cubic-bezier(.22,.61,.36,1) !important;
    z-index: 10001 !important;
    overflow: hidden !important;
  }

  html body #tn-public-portfolio.theme-dark .tn-mobile-menu-panel {
    background:
      radial-gradient(circle at 0 0, rgba(93,149,255,.16), transparent 26%),
      linear-gradient(180deg, rgba(9,21,37,.98), rgba(7,17,31,.98)) !important;
    border-right: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 28px 0 60px rgba(0,0,0,.34) !important;
  }

  html body #tn-public-portfolio.theme-light .tn-mobile-menu-panel {
    background:
      radial-gradient(circle at 0 0, rgba(33,108,255,.09), transparent 26%),
      linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,251,255,.98)) !important;
    border-right: 1px solid #dfe8f5 !important;
    box-shadow: 28px 0 60px rgba(11,26,48,.12) !important;
  }

  html body #tn-public-portfolio.tn-mobile-menu-open .tn-mobile-menu-backdrop {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  html body #tn-public-portfolio.tn-mobile-menu-open .tn-mobile-menu-panel {
    transform: translateX(0) !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-shell {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 18px 16px 18px !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-brand img {
    height: 36px !important;
    width: auto !important;
    max-width: 190px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-close {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 0 !important;
  }

  html body #tn-public-portfolio.theme-dark .tn-mobile-menu-close {
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    color: #f6f9ff !important;
  }

  html body #tn-public-portfolio.theme-light .tn-mobile-menu-close {
    background: #ffffff !important;
    border: 1px solid #dde6f5 !important;
    color: #0b1a30 !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-close svg {
    width: 18px !important;
    height: 18px !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-links {
    display: grid !important;
    gap: 12px !important;
    margin-top: 6px !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-link {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-height: 58px !important;
    padding: 0 18px !important;
    border-radius: 18px !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: -.01em !important;
  }

  html body #tn-public-portfolio.theme-dark .tn-mobile-menu-link {
    color: #f6f9ff !important;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04)) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
  }

  html body #tn-public-portfolio.theme-light .tn-mobile-menu-link {
    color: #0b1a30 !important;
    background: linear-gradient(180deg, #ffffff, #f7fbff) !important;
    border: 1px solid #e4ebf7 !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-link-icon,
  html body #tn-public-portfolio .tn-mobile-menu-link-arrow {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #5d95ff !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-foot {
    margin-top: auto !important;
    padding-top: 18px !important;
  }

  html body #tn-public-portfolio .tn-mobile-menu-note {
    font-size: 13px !important;
    line-height: 1.7 !important;
    opacity: .82 !important;
    padding: 14px 14px 0 !important;
  }

  /* Mobile content */
  html body #tn-public-portfolio .tn-hero {
    padding-top: 22px !important;
    padding-bottom: 12px !important;
    text-align: left !important;
  }

  html body #tn-public-portfolio .tn-hero h1 {
    font-size: clamp(34px, 9vw, 54px) !important;
    line-height: 1.05 !important;
    letter-spacing: -.035em !important;
    text-align: left !important;
    max-width: 100% !important;
    margin: 0 0 16px !important;
  }

  html body #tn-public-portfolio .tn-hero p {
    font-size: 16px !important;
    line-height: 1.72 !important;
    text-align: left !important;
    max-width: 100% !important;
    margin-left: 0 !important;
  }

  html body #tn-public-portfolio .tn-chip-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 14px !important;
    border-radius: 22px !important;
    margin-top: 18px !important;
  }

  html body #tn-public-portfolio .tn-chip {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 52px !important;
    justify-content: center !important;
    border-radius: 999px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
  }

  html body #tn-public-portfolio .tn-chip:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }

  html body #tn-public-portfolio .tn-stats,
  html body #tn-public-portfolio .tn-grid,
  html body #tn-public-portfolio .tn-contact-grid,
  html body #tn-public-portfolio .tn-cta,
  html body #tn-public-portfolio .tn-benefits-strip {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  html body #tn-public-portfolio .tn-panel,
  html body #tn-public-portfolio .tn-created,
  html body #tn-public-portfolio .tn-cta,
  html body #tn-public-portfolio .tn-contact {
    border-radius: 24px !important;
    margin-top: 20px !important;
  }

  html body #tn-public-portfolio .tn-panel-head h2,
  html body #tn-public-portfolio .tn-created h2,
  html body #tn-public-portfolio .tn-cta h2,
  html body #tn-public-portfolio .tn-contact-head h2 {
    font-size: 28px !important;
    line-height: 1.12 !important;
  }

  html body #tn-public-portfolio .tn-search-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  html body #tn-public-portfolio .tn-search,
  html body #tn-public-portfolio .tn-clear-btn {
    min-height: 52px !important;
    border-radius: 16px !important;
  }

  html body #tn-public-portfolio .tn-tabs,
  html body #tn-public-portfolio .tn-tabs-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  html body #tn-public-portfolio .tn-tabs::-webkit-scrollbar,
  html body #tn-public-portfolio .tn-tabs-wrap::-webkit-scrollbar {
    display: none !important;
  }

  html body #tn-public-portfolio .tn-tab {
    flex: 0 0 auto !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  html body #tn-public-portfolio .tn-card {
    width: 100% !important;
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  html body #tn-public-portfolio .tn-card-media {
    min-height: 185px !important;
  }

  html body #tn-public-portfolio .tn-card-body {
    padding: 18px !important;
  }

  html body #tn-public-portfolio .tn-card h3 {
    font-size: 26px !important;
    line-height: 1.05 !important;
  }

  html body #tn-public-portfolio input,
  html body #tn-public-portfolio textarea,
  html body #tn-public-portfolio select {
    min-height: 52px !important;
    border-radius: 14px !important;
    font-size: 16px !important;
  }

  html body #tn-public-portfolio .tn-mobile-bar {
    display: none !important;
  }

  html body #tn-public-portfolio .tn-mobile-bar.tn-mobile-bar-visible {
    display: flex !important;
  }
}

@media (max-width: 420px) {
  html body #tn-public-portfolio {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  html body #tn-public-portfolio .tn-logo img {
    max-width: min(182px, calc(100vw - 124px)) !important;
  }

  html body #tn-public-portfolio .tn-hero h1 {
    font-size: clamp(31px, 10vw, 44px) !important;
  }

  html body #tn-public-portfolio .tn-chip {
    font-size: 13px !important;
  }
}


/* v2.2.2: turn dark-mode logo white */
html body #tn-public-portfolio.theme-dark .tn-logo img,
html body #tn-public-portfolio.theme-dark .tn-mobile-menu-brand img {
  filter: brightness(0) invert(1) !important;
}

html body #tn-public-portfolio.theme-light .tn-logo img,
html body #tn-public-portfolio.theme-light .tn-mobile-menu-brand img {
  filter: none !important;
}
