/* ========= Base reset ========= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #020617, #000000 65%);
  color: #e5e7eb;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

body.light-theme {
  background: radial-gradient(circle at top, #f9fafb, #e5e7eb 70%);
  color: #020617;
}

/* Fade-in */
body.fade-in {
  opacity: 1;
  transition: opacity 0.4s ease-out;
}
body:not(.fade-in) {
  opacity: 0;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* ========= Layout ========= */
.page {
  min-height: 100vh;
  padding: 96px 16px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.98));
  border-radius: 32px;
  padding: 22px 18px 26px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 22px 60px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.7);
  overflow: hidden;
}

body.light-theme .card {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.06), #ffffff);
  border-color: rgba(148, 163, 184, 0.5);
}

/* ========= Background orbs & rain ========= */
.bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
}

.orb1 {
  width: 260px;
  height: 260px;
  top: -40px;
  right: -60px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.65), transparent 70%);
}

.orb2 {
  width: 220px;
  height: 220px;
  bottom: -60px;
  left: -40px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.7), transparent 70%);
}

.orb3 {
  width: 180px;
  height: 180px;
  top: 40%;
  left: 40%;
  background: radial-gradient(circle, rgba(248, 250, 252, 0.16), transparent 70%);
}

.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    to bottom,
    rgba(148, 163, 184, 0.08) 1px,
    transparent 1px
  );
  background-size: 2px 32px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  z-index: -2;
}

/* ========= Top nav ========= */
.top-nav {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nav-inner {
  width: min(960px, 100% - 24px);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: auto;
  backdrop-filter: blur(20px);
}

body.light-theme .nav-inner {
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(148, 163, 184, 0.7);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #020617;
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 999px;
  opacity: 0.8;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

.nav-link:hover {
  opacity: 1;
  background: rgba(148, 163, 184, 0.24);
  transform: translateY(-1px);
}

body.light-theme .nav-link:hover {
  background: rgba(148, 163, 184, 0.18);
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
}

/* ========= Theme toggle button ========= */
#theme-toggle {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.92);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.8);
  cursor: pointer;
  z-index: 40;
}

body.light-theme #theme-toggle {
  background: #111827;
  color: #f9fafb;
}

/* ========= Scroll to top ========= */
#scroll-top {
  position: fixed;
  bottom: 72px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
}

#scroll-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#scroll-top.hide {
  opacity: 0;
  pointer-events: none;
}

/* ========= Card header ========= */
.card-header {
  position: relative;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  margin-bottom: 16px;
}

.hero-glow {
  position: absolute;
  inset: -140px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(circle at 100% 0%, rgba(248, 250, 252, 0.1), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}

.avatar-wrapper {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 8px;
  background: conic-gradient(from 140deg, #22c55e, #22d3ee, #6366f1, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #020617;
}

.name {
  font-size: 1.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tagline {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.9;
}

#role-typed {
  font-weight: 500;
}

.cursor-typed {
  opacity: 0.7;
  animation: blink 1s infinite;
}

.cursor-typed.off {
  opacity: 0.2;
}

@keyframes blink {
  0%, 50% { opacity: 0; }
  51%, 100% { opacity: 1; }
}

/* Language toggle */
.lang-toggle {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.72rem;
}

.lang-btn {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.6;
}

.lang-btn.active {
  opacity: 1;
  background: rgba(248, 250, 252, 0.08);
}

.lang-sep {
  opacity: 0.4;
}

/* ========= Badges ========= */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-size: 0.72rem;
}

.badge-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: linear-gradient(135deg, #22c55e, #22d3ee);
  color: #020617;
}

.pulse-icon {
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ========= About ========= */
.about {
  margin-top: 16px;
}

.about-text {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.94;
}

.now-line {
  margin-top: 6px;
  font-size: 0.82rem;
  opacity: 0.85;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pill {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* ========= Stats ========= */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.stat-pill {
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.stat-label {
  font-size: 0.72rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-value {
  margin-top: 3px;
  font-size: 0.98rem;
  font-weight: 600;
}

/* ========= Mood box ========= */
.mood-box {
  margin-top: 18px;
  padding: 12px 12px 14px;
  border-radius: 20px;
  background: radial-gradient(circle at top left, rgba(52, 211, 153, 0.18), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(52, 211, 153, 0.5);
}

.section-title {
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.mood-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.mood-btn {
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

.mood-message {
  font-size: 0.82rem;
  opacity: 0.9;
}

/* ========= CTA ========= */
.cta {
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #22c55e);
  color: #f9fafb;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.8);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  filter: brightness(1.05);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-shadow: none;
}

/* ========= Social links ========= */
.links {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.links .btn {
  width: 100%;
  justify-content: flex-start;
  padding: 8px 10px;
  font-size: 0.84rem;
  box-shadow: none;
}

.links .icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* Different brand colors */
.btn-facebook {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.btn-tiktok {
  background: radial-gradient(circle at 0 0, #06b6d4, transparent 55%), #020617;
}

.btn-instagram {
  background: radial-gradient(circle at 0 0, #f97316, transparent 55%), #be185d;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.btn-email {
  background: linear-gradient(135deg, #4b5563, #020617);
}

.btn-telegram {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

/* ========= Services ========= */
.services {
  margin-top: 22px;
}

.services-header h2 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.services-header p {
  font-size: 0.86rem;
  opacity: 0.9;
}

.services-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.service-card {
  display: flex;
  gap: 10px;
  padding: 10px 10px 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.5);
  cursor: default;
}

.service-card[data-tool] {
  cursor: pointer;
}

.service-card[data-tool]:hover {
  border-color: rgba(52, 211, 153, 0.9);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.95);
}

.service-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.service-card h3 {
  font-size: 0.9rem;
}

.service-card p {
  font-size: 0.8rem;
  opacity: 0.9;
}

.service-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  opacity: 0.8;
}

.services-cta {
  margin-top: 14px;
}

/* ========= Projects ========= */
.projects {
  margin-top: 24px;
}

.projects h2 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.project-card {
  padding: 10px 10px 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.project-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.project-card h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.project-card p {
  font-size: 0.8rem;
  opacity: 0.9;
}

.project-tag {
  margin-top: 4px;
  font-size: 0.72rem;
  opacity: 0.8;
}

/* ========= Contact ========= */
.contact {
  margin-top: 24px;
}

.contact h2 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-text {
  font-size: 0.86rem;
  opacity: 0.9;
  margin-bottom: 8px;
}

.contact-form {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.form-row label {
  display: block;
  font-size: 0.8rem;
}

.form-row span {
  display: block;
  margin-bottom: 3px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.96);
  padding: 7px 10px;
  color: #e5e7eb;
  font-size: 0.84rem;
  outline: none;
}

.hidden-field {
  display: none;
}

.btn-submit {
  margin-top: 4px;
}

/* ========= Testimonials ========= */
.testimonials {
  margin-top: 24px;
}

.testimonials h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.testimonials-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.testimonial-card {
  padding: 10px 10px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.82rem;
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.avatar-small {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}

.testimonial-role {
  font-size: 0.74rem;
  opacity: 0.8;
}

.testimonial-text {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* ========= Footer ========= */
.footer {
  margin-top: 26px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 0.8rem;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.footer-column h3 {
  font-size: 0.9rem;
}

.footer-column h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.footer-column a {
  display: block;
  font-size: 0.78rem;
  opacity: 0.85;
}

.footer-social a {
  margin-right: 8px;
  font-size: 1rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: space-between;
  align-items: center;
}

.footer-meta {
  font-size: 0.74rem;
  opacity: 0.85;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  margin-right: 4px;
}

/* ========= Loader ========= */
#loader {
  position: fixed;
  inset: 0;
  background: #020617;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.3s ease;
}

#loader.loader-hide {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.4);
  border-top-color: #22c55e;
  animation: spin 0.9s linear infinite;
  margin-bottom: 10px;
}

#loader p {
  font-size: 0.86rem;
  opacity: 0.85;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========= Cursor dot ========= */
.cursor-dot {
  position: fixed;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.7);
  pointer-events: none;
  transform: translate3d(-999px, -999px, 0);
  transition: transform 0.07s linear, opacity 0.2s ease;
  opacity: 0;
  z-index: 999;
}

/* ========= Greeting toast ========= */
.greeting-toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.greeting-body {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.96);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  backdrop-filter: blur(16px);
}

#greeting-close {
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
}

.greeting-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ========= Ask Jubayer AI ========= */
.ask-ai-btn {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.9);
  cursor: pointer;
  z-index: 40;
}

.ask-ai-panel {
  position: fixed;
  left: 18px;
  bottom: 70px;
  width: min(340px, 90vw);
  background: rgba(15, 23, 42, 0.98);
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.95);
  padding: 12px 12px 10px;
  font-size: 0.82rem;
  z-index: 45;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  backdrop-filter: blur(16px);
}

.ask-ai-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ask-ai-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.ask-ai-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.ask-ai-sub {
  font-size: 0.78rem;
  opacity: 0.8;
}

.ask-ai-close {
  border: none;
  background: transparent;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ask-ai-hint {
  font-size: 0.78rem;
  opacity: 0.85;
  margin-bottom: 4px;
}

.ask-ai-hint span {
  display: inline-block;
  margin-top: 3px;
  margin-right: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.ask-ai-form textarea,
.ask-ai-form input[type="text"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.96);
  padding: 6px 8px;
  color: #e5e7eb;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.ask-ai-form button {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 6px 8px;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  color: #f9fafb;
  cursor: pointer;
}

.ask-ai-note {
  font-size: 0.72rem;
  opacity: 0.75;
  margin-top: 4px;
}

/* ========= Reveal animation ========= */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========= Tools Overlay / Modal ========= */
.hidden {
  display: none !important;
}

.tool-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.tool-modal {
  width: min(960px, 95vw);
  max-height: 90vh;
  background: radial-gradient(circle at top, #1c263b, #050816 70%);
  border-radius: 26px;
  padding: 22px 22px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow-y: auto;
}

.tool-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.tool-header {
  padding: 6px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.tool-header h2 {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-header p {
  font-size: 0.82rem;
  opacity: 0.8;
}

.tool-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Utility Pack */
.tool-panel h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.tool-card {
  background: radial-gradient(circle at top left, rgba(120, 116, 255, 0.18), rgba(15, 23, 42, 0.95));
  border-radius: 18px;
  padding: 14px 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.7);
}

.tool-card h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.tool-card input,
.tool-card textarea {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 8px 12px;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  outline: none;
}

.tool-card textarea {
  border-radius: 14px;
  resize: vertical;
}

.tool-card button {
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  background: linear-gradient(120deg, #22c1c3, #4a6cf7);
  color: #f9fafb;
}

.tool-card button.ghost {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.qr-preview {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.qr-preview img {
  max-width: 160px;
  border-radius: 16px;
  background: #fff;
  padding: 6px;
}

.tool-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.78rem;
  opacity: 0.8;
}

/* Password block */
.small-label {
  font-size: 0.8rem;
  display: block;
  margin-bottom: 6px;
}

.small-label input {
  width: 80px;
  display: inline-block;
  margin-left: 6px;
}

.chk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 6px 0 8px;
  font-size: 0.78rem;
}

.pass-output {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.pass-output input {
  flex: 1;
}

.pass-output button {
  width: 34px;
  height: 34px;
  padding: 0;
}

/* Notes */
.tool-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tool-hint {
  margin-top: 6px;
  font-size: 0.74rem;
  opacity: 0.8;
}

/* Device info */
.info-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 8px;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.info-list span {
  opacity: 0.8;
}

/* Prayer box */
.prayer-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.2), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(96, 165, 250, 0.4);
  font-size: 0.9rem;
}

/* BMI */
.bmi-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.bmi-form label {
  flex: 1 1 120px;
  font-size: 0.82rem;
}

.bmi-form input {
  margin-top: 4px;
  width: 100%;
}

.bmi-result {
  margin-top: 8px;
  font-size: 0.9rem;
}

/* Small screens */
@media (max-width: 640px) {
  .card {
    padding: 18px 14px 22px;
    border-radius: 26px;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .tool-modal {
    padding: 18px 14px 18px;
    border-radius: 22px;
  }

  .tool-card {
    padding: 12px 12px 14px;
  }

  .info-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}m;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ask-ai-note {
  font-size: 0.7rem;
  color: var(--text-soft);
  margin-top: 4px;
}

/* --------------------
   Generator page
-------------------- */

.generator-page {
  min-height: 100vh;
  padding: 90px 18px 40px;
  display: flex;
  justify-content: center;
  background: radial-gradient(circle at top, #1b2a4a 0, #050816 55%, #020308 100%);
  color: #f7f7ff;
}

.generator-shell {
  width: 100%;
  max-width: 820px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.75);
  padding: 18px 16px 20px;
}

.generator-shell h1 {
  font-size: 1.08rem;
  margin-bottom: 4px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.generator-shell p.lead {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.generator-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.generator-top a {
  text-decoration: none;
  color: #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.generator-top a:hover {
  text-decoration: underline;
}

.generator-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 14px;
}

@media (max-width: 768px) {
  .generator-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gen-field {
  margin-bottom: 8px;
}

.gen-field label {
  font-size: 0.8rem;
  display: block;
  margin-bottom: 3px;
}

.gen-field input {
  width: 100%;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.94);
  color: #e5e7eb;
  padding: 7px 9px;
  font-size: 0.82rem;
}

.gen-field input::placeholder {
  opacity: 0.65;
}

.generator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.generator-actions button {
  flex: 1 1 120px;
  border-radius: 999px;
  border: none;
  padding: 8px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-generate {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #0f172a;
  font-weight: 600;
}

.btn-copy {
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #f9fafb;
}

.generator-output {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.generator-output p {
  margin-bottom: 4px;
}

.generator-output textarea {
  width: 100%;
  margin-top: 4px;
  font-family: monospace;
  font-size: 0.72rem;
  min-height: 240px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  padding: 8px 9px;
}

/* --------------------
   404 page
-------------------- */

.not-found {
  min-height: 100vh;
  padding: 96px 18px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.not-found-inner {
  max-width: 420px;
  text-align: center;
  padding: 24px 20px;
  border-radius: 26px;
  background: var(--bg-card);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: var(--shadow-soft);
}

.not-found-inner h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.not-found-inner p {
  font-size: 0.86rem;
  color: var(--text-soft);
  margin-bottom: 12px;
}

/* --------------------
   TOOLS PAGE LAYOUT (services.html)
-------------------- */

.tools-page {
  min-height: 100vh;
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #1b2a4a 0, #050816 55%, #020308 100%);
  color: #f7f7ff;
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
}

.tools-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tools-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tools-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a18, #af002d 70%, #319197);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.tools-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.tools-sub {
  font-size: 0.8rem;
  opacity: 0.8;
}

.tools-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(5, 8, 22, 0.85);
  text-decoration: none;
  color: #f7f7ff;
}

.tools-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: stretch;
}

.tool-card {
  flex: 1 1 260px;
  max-width: 350px;
  background: radial-gradient(circle at top left, #222b4b 0, #050816 55%, #050814 100%);
  border-radius: 24px;
  padding: 1.2rem 1.3rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

.tool-head {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, #ffb347, #ff5f6d);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-head h2 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.tool-head p {
  font-size: 0.8rem;
  opacity: 0.8;
  margin: 0;
}

.tool-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tool-label {
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tool-input,
.tool-select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 7, 25, 0.9);
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  color: #f7f7ff;
}

.tool-input::placeholder {
  opacity: 0.6;
}

.tool-btn {
  width: 100%;
  margin-top: 0.3rem;
  font-size: 0.85rem;
}

.tool-result {
  margin-top: 0.3rem;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: rgba(5, 10, 35, 0.95);
  font-size: 0.78rem;
  line-height: 1.35;
}

.tool-result-small {
  font-size: 0.76rem;
}

.tool-note {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  opacity: 0.75;
}

/* Thumbnail grid */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.thumb-img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  max-height: 90px;
}

/* Responsive tools page */
@media (max-width: 900px) {
  .tools-layout {
    flex-direction: column;
  }
  .tool-card {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .tools-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------
   Responsive tweaks (home)
-------------------- */

@media (max-width: 480px) {
  .card {
    padding-inline: 16px;
  }

  .services {
    padding-inline: 12px;
  }

  .avatar-wrapper {
    width: 104px;
    height: 104px;
  }

  .name {
    font-size: 1.25rem;
    letter-spacing: 0.16em;
  }
}