/* ============================================================================
   REFRESH v3.0 — Codenzic-inspired design system
   ----------------------------------------------------------------------------
   Loaded after style.css, which keeps the structural base (modals and their
   .visible contract, form mechanics, focus traps, toasts). This layer owns the
   visual identity:

     canvas   #F7F7F7 light gray
     ink      #171717 near-black text
     brand    #1E5CE1 vivid blue
     dark     gradient #0A0A0A -> #071126 -> #0A1939 (feature bands)
     display  Unbounded (variable) via --font-display
     body     Montserrat (variable)
     shape    pill buttons (999px), 1.25-1.75rem card radii
     motion   220-300ms ease hovers, scroll-reveal via [data-reveal]
   ========================================================================== */

/* ===== 1. DESIGN TOKENS ===== */
:root {
  --primary-color: #1e5ce1;
  --primary-dark: #1747b3;
  --accent-color: #1e5ce1;
  --brand-glow: rgb(30 92 225 / 80%);
  --ink: #171717;
  --paper: #f7f7f7;
  --muted: #4e4e4e;
  --soft-muted: #6e6e6e;
  --line: rgb(23 23 23 / 10%);
  --line-strong: rgb(23 23 23 / 18%);
  --blue-soft: rgb(30 92 225 / 8%);
  --dark-gradient: linear-gradient(135deg, #0a0a0a 0%, #071126 55%, #0a1939 100%);
  --shadow-soft: 0 8px 30px rgb(23 23 23 / 6%);
  --shadow-lift: 0 24px 60px rgb(23 23 23 / 12%);

  /* Neutral ramp (overrides style.css slate ramp globally) */
  --gray-50: #f7f7f7;
  --gray-100: #ededed;
  --gray-200: #e3e3e3;
  --gray-300: #c9c9c9;
  --gray-400: #9a9a9a;
  --gray-500: #6e6e6e;
  --gray-600: #4e4e4e;
  --gray-700: #383838;
  --gray-800: #232323;
  --gray-900: #141414;

  /* Radii */
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
}

/* Unbounded (display) + Montserrat (body): see vendor/css/google-news.css faces.
   Tokens are declared after the @font-face rules load, so heads up:
   --font-display / --font-primary are declared in the next block. */

/* ===== 2. TYPOGRAPHY TOKENS ===== */
:root {
  --font-display: "Unbounded", "Poppins", -apple-system, sans-serif;
  --font-primary: "Montserrat", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  --font-secondary: "Montserrat", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
}

/* ===== 3. BASE ===== */
html {
  scroll-padding-top: 5.5rem;
  overflow-x: clip;
}

body {
  background: #f7f7f7;
  color: #232323;
}

::selection {
  color: #fff;
  background: #1e5ce1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

p {
  color: #4e4e4e;
}

a:hover {
  color: var(--primary-dark);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid #1e5ce1;
  outline-offset: 3px;
}

section {
  padding: clamp(4.5rem, 8vw, 7rem) 0;
}

section + section::before {
  width: min(90%, 1320px);
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.container {
  max-width: 1320px;
}

/* ===== 4. SECTION HEADERS ===== */
.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  text-align: left;
}

.section-eyebrow {
  margin-bottom: 1rem;
  color: #1e5ce1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 0.75rem;
  color: #171717;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

.section-subtitle {
  max-width: 62ch;
  margin: 0;
  color: #6e6e6e;
  font-size: 1.02rem;
  line-height: 1.75;
}

/* ===== 5. BUTTONS ===== */
.btn {
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 220ms ease, background-color 220ms ease,
    color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: #171717;
  color: #fff;
  box-shadow: 0 10px 24px rgb(23 23 23 / 16%);
}

.btn-primary:hover {
  background: #1e5ce1;
  color: #fff;
  box-shadow: 0 14px 30px rgb(30 92 225 / 28%);
}

.btn-blue,
.btn-secondary {
  background: #1e5ce1;
  color: #fff;
  box-shadow: 0 10px 24px rgb(30 92 225 / 22%);
}

.btn-blue:hover,
.btn-secondary:hover {
  background: #1747b3;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #171717;
  border: 1.5px solid var(--line-strong);
}

.btn-outline:hover {
  background: transparent;
  color: #1e5ce1;
  border-color: #1e5ce1;
  box-shadow: none;
}

/* Contact page submit: style.css has a higher-specificity hover that paints
   it amber; keep it in the pill family here. */
.contact-form button:hover {
  background: #1e5ce1;
  color: #fff;
}

/* ===== 6. NAVBAR (light glass) ===== */
.navbar {
  background: rgb(247 247 247 / 88%);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.navbar.scrolled {
  background: rgb(247 247 247 / 94%);
  box-shadow: 0 12px 32px rgb(23 23 23 / 7%);
}

.nav-container {
  max-width: 1320px;
}

.nav-logo > a:first-child {
  color: #171717;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.nav-logo > a:first-child:hover {
  color: #1e5ce1;
}

.nav-logo-sep {
  color: #9a9a9a;
}

.nav-menu {
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
}

.nav-menu .nav-link {
  color: #3a3a3a;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-menu .nav-link:hover,
.nav-menu .nav-link.active {
  color: #1e5ce1;
}

.bar {
  background: #171717;
}

.nav-toggle {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(23 23 23 / 6%);
}

.nav-cta {
  background: #171717;
  color: #fff;
  border-radius: 999px;
  padding: 0.65rem 1.35rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgb(23 23 23 / 14%);
}

.nav-cta:hover {
  background: #1e5ce1;
  color: #fff;
  box-shadow: 0 12px 26px rgb(30 92 225 / 30%);
}

.scroll-progress {
  background: linear-gradient(90deg, #1e5ce1, #4f83ff);
}

/* --- Nav dropdown: desktop --- */
.nav-caret {
  margin-left: 0.4em;
  font-size: 0.62em;
  transition: transform 220ms ease;
}

@media (min-width: 1081px) {
  .nav-dropdown {
    position: relative;
  }

  .nav-dropdown:hover .nav-caret,
  .nav-dropdown:focus-within .nav-caret {
    transform: rotate(180deg);
  }

  .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 80;
    padding-top: 0.75rem; /* hover bridge */
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
  }

  .nav-dropdown-card {
    display: flex;
    min-width: 250px;
    flex-direction: column;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 24px 60px rgb(23 23 23 / 14%);
  }

  .nav-dropdown-item {
    padding: 0.7rem 1rem;
    border-radius: 0.6rem;
    color: #171717;
    font-size: 0.94rem;
    font-weight: 500;
    transition: background-color 200ms ease, color 200ms ease;
  }

  .nav-dropdown-item:hover {
    background: #f7f7f7;
    color: #1e5ce1;
  }
}

/* --- Mobile menu: floating rounded card sliding from the right --- */
@media (max-width: 1080px) {
  .nav-menu {
    position: fixed;
    top: calc(82px + env(safe-area-inset-top, 0px));
    left: 1rem;
    right: auto;
    width: calc(100% - 2rem);
    max-width: none;
    height: calc(100dvh - 96px - env(safe-area-inset-top, 0px));
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    box-shadow: 0 30px 80px rgb(23 23 23 / 18%);
    padding: 1rem;
    gap: 0.15rem;
    text-align: left;
    overflow-y: auto;
    transform: translateX(calc(100% + 1.5rem));
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.32s ease, visibility 0.32s ease;
  }

  .nav-menu.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-menu .nav-link {
    color: #171717;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    justify-content: flex-start;
    font-size: 0.98rem;
  }

  .nav-menu .nav-link:hover {
    color: #1e5ce1;
    background: #f7f7f7;
  }

  .nav-menu .nav-link::after {
    display: none;
  }

  .nav-menu .nav-cta {
    margin: 0.9rem auto 0.4rem;
    min-width: 220px;
  }

  .nav-caret {
    display: none;
  }

  .nav-dropdown-menu {
    position: static;
    padding: 0;
    margin: 0 0 0.4rem 1.1rem;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-dropdown-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 0 0 0.9rem;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }

  .nav-dropdown-item {
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
    color: rgb(23 23 23 / 65%);
  }

  .nav-menu .account-dropdown-menu {
    position: static;
    margin: 0 0 0.4rem 1.1rem;
    padding: 0 0 0 0.9rem;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }

  .nav-menu .account-dropdown-item {
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
  }
}

/* ===== 7. TYPOGRAPHIC HERO (home) ===== */
.hero-typo {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 70px);
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  background: #f7f7f7;
  overflow: hidden;
}

/* Faint blue rings, codenzic hero-vector feel */
.hero-typo::before,
.hero-typo::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgb(30 92 225 / 9%);
  pointer-events: none;
}

.hero-typo::before {
  top: -22vw;
  right: -12vw;
  width: 46vw;
  height: 46vw;
}

.hero-typo::after {
  bottom: -30vw;
  left: -18vw;
  width: 52vw;
  height: 52vw;
  border-color: rgb(30 92 225 / 7%);
}

.hero-display {
  position: relative;
  z-index: 1;
  max-width: 22ch;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
  color: #171717;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 7.6vw, 5.6rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero-display .accent {
  color: #1e5ce1;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 5rem);
}

.hero-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.5rem;
}

.hero-quick-link {
  width: fit-content;
  color: #171717;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: rgb(23 23 23 / 42%);
  text-underline-offset: 4px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

.hero-quick-link:hover {
  color: #1e5ce1;
  text-decoration-color: #1e5ce1;
}

.hero-copy {
  max-width: 58ch;
  margin-bottom: 1.9rem;
  color: #4e4e4e;
  font-size: clamp(0.98rem, 1.6vw, 1.13rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-actions .btn {
  min-height: 52px;
  padding: 0.95rem 1.7rem;
  font-size: 0.98rem;
}

/* ===== 8. CARDS ===== */
.service-card,
.project-card,
.blog-post-card,
.skill-item,
.stat-item,
.testimonial-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-soft);
}

/* style.css plays a scaleIn keyframe with `forwards` fill on these, which
   permanently pins transform: scale(1) and kills every hover lift. Retire it:
   the IntersectionObserver reveal handles entrance animation instead. */
.service-card,
.project-card,
.blog-post-card,
.skill-item,
.stat-item {
  animation: none;
}

.service-card,
.project-card,
.blog-post-card,
.home-feature-card {
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.service-card:hover,
.project-card:hover,
.blog-post-card:hover,
.home-feature-card:hover {
  transform: translateY(-5px);
  border-color: rgb(30 92 225 / 35%);
  box-shadow: var(--shadow-lift);
}

.service-card h2,
.project-title,
.blog-post-title {
  color: #171717;
  letter-spacing: -0.025em;
}

.service-card-intro,
.project-description,
.blog-post-excerpt {
  color: #6e6e6e;
  line-height: 1.7;
}

.project-image,
.blog-post-image-wrapper {
  height: auto;
  aspect-ratio: 4 / 3;
  background: #ededed;
  overflow: hidden;
}

.project-image img,
.blog-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover .project-image img,
.blog-post-card:hover .blog-post-image {
  transform: scale(1.04);
}

.project-placeholder,
.projects-placeholder {
  border-color: var(--line);
  background: #ededed;
  color: #9a9a9a;
}

.projects-placeholder {
  padding: clamp(2rem, 5vw, 3rem);
  border: 1px dashed var(--line-strong);
  border-radius: 1.25rem;
  background: #fff;
  color: #6e6e6e;
}

.tech-tag {
  padding: 0.28rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #4e4e4e;
  font-size: 0.76rem;
  font-weight: 600;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #1e5ce1;
  font-size: 0.92rem;
  font-weight: 600;
}

.read-more-link:hover {
  color: #1747b3;
}

.projects-blurb-heading {
  color: #171717;
  font-size: 1.12rem;
  font-weight: 650;
}

.projects-note {
  max-width: 760px;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--line);
  border-left: 3px solid #1e5ce1;
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.projects-note p {
  margin: 0;
  color: #4e4e4e;
  line-height: 1.7;
}

/* ===== 9. NUMBERED SERVICE ROWS ===== */
.service-row-list {
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.1rem, 3vw, 2.5rem);
  padding: clamp(1.35rem, 2.8vw, 2rem) 0.25rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background-color 200ms ease;
}

.service-row:hover {
  background: rgb(255 255 255 / 65%);
}

.service-row-num {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgb(23 23 23 / 30%);
  transition: color 220ms ease;
}

.service-row-title {
  display: block;
  color: #171717;
  font-size: clamp(1.2rem, 2.4vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
  transition: transform 300ms ease;
}

.service-row-desc {
  display: block;
  max-width: 62ch;
  margin-top: 0.4rem;
  color: #6e6e6e;
  font-size: 0.92rem;
  line-height: 1.65;
}

.service-row-arrow {
  display: grid;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #171717;
  transition: background-color 220ms ease, border-color 220ms ease,
    color 220ms ease, transform 220ms ease;
}

.service-row-arrow i {
  transform: rotate(-45deg);
  transition: transform 220ms ease;
}

.service-row:hover .service-row-num {
  color: #1e5ce1;
}

.service-row:hover .service-row-title {
  transform: translateX(6px);
}

.service-row:hover .service-row-arrow {
  background: #1e5ce1;
  border-color: #1e5ce1;
  color: #fff;
  transform: translate(2px, -2px);
}

/* ===== 10. NUMBERED FEATURE CARDS (problems) ===== */
.problem-solutions-section .services-grid,
.service-offerings-section .services-grid {
  counter-reset: feature-card;
  gap: 1.25rem;
}

.home-feature-card {
  position: relative;
  counter-increment: feature-card;
  min-height: 220px;
  padding: 1.6rem;
  background: #fff;
}

.home-feature-card::before {
  position: static;
  inset: auto;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1.1rem;
  place-items: center;
  border-radius: 0.75rem;
  background: var(--blue-soft);
  color: #1e5ce1;
  content: counter(feature-card, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 1;
}

.home-feature-card::after {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #9a9a9a;
  content: "→";
  font-size: 0.95rem;
  transition: background-color 220ms ease, color 220ms ease,
    border-color 220ms ease, transform 220ms ease;
}

.home-feature-card h2 {
  margin-bottom: 0.6rem;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}

.home-feature-card h2 a {
  color: #171717;
  text-decoration: none;
}

.home-feature-card h2 a:hover {
  color: #1e5ce1;
}

.home-feature-card .service-card-intro {
  margin-bottom: 1.25rem;
  font-size: 0.94rem;
}

.home-feature-card .service-card-actions {
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  gap: 0.5rem;
}

.home-feature-card .service-card-btn {
  min-height: 40px;
  padding: 0.55rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1e5ce1;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 220ms ease, color 220ms ease,
    transform 220ms ease;
}

.home-feature-card .service-card-btn:hover {
  background: #1e5ce1;
  color: #fff;
  transform: translateY(-2px);
}

.home-feature-card .service-card-link {
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
}

.home-feature-card:hover::after {
  border-color: #1e5ce1;
  background: #1e5ce1;
  color: #fff;
  transform: translate(2px, -2px);
}

/* ===== 10b. PROBLEM CARDS (codenzic careers "A Team You Grow With") ===== */
.problem-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

/* The cell owns rotation + column stagger; the card inside owns the reveal
   transform -- the two compose instead of fighting over `transform`. */
.problem-card-cell {
  transform: rotate(var(--tilt, 0deg));
  transition: transform 300ms ease;
}

.problem-card-cell:nth-child(6n + 1) { --tilt: -2deg; }
.problem-card-cell:nth-child(6n + 2) { --tilt: 1deg; }
.problem-card-cell:nth-child(6n + 3) { --tilt: -1deg; }
.problem-card-cell:nth-child(6n + 4) { --tilt: 2deg; }
.problem-card-cell:nth-child(6n + 5) { --tilt: -1deg; }
.problem-card-cell:nth-child(6n + 6) { --tilt: 1deg; }

.problem-card-cell:hover,
.problem-card-cell:focus-within {
  transform: rotate(0deg) translateY(-6px);
}

/* [problem-cards:components] */
.problem-card {
  display: flex;
  height: 100%;
  min-height: 230px;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: #fff;
  color: #171717;
  box-shadow: var(--shadow-soft);
}

.problem-card-cell:hover .problem-card {
  box-shadow: var(--shadow-lift);
}

.problem-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.problem-card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: rgb(30 92 225 / 8%);
  color: #1e5ce1;
  font-size: 1.05rem;
}

.problem-card-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(23 23 23 / 25%);
}

.problem-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-wrap: balance;
}

.problem-card-title a {
  color: inherit;
  text-decoration: none;
}

.problem-card-title a:hover {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.problem-card-desc {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgb(23 23 23 / 55%);
}

.problem-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e5ce1;
  text-decoration: none;
}

.problem-card-link i {
  font-size: 0.72rem;
  transition: transform 220ms ease;
}

.problem-card-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.problem-card-link:hover i {
  transform: translateX(4px);
}

/* [problem-cards:variants] */
.problem-card-blue,
.problem-card-dark {
  border-color: transparent;
  color: #fff;
}

.problem-card-blue {
  background: #1e5ce1;
}

.problem-card-dark {
  background: #171717;
}

.problem-card-blue .problem-card-icon,
.problem-card-dark .problem-card-icon {
  background: rgb(255 255 255 / 15%);
  color: #fff;
}

.problem-card-blue .problem-card-num,
.problem-card-dark .problem-card-num {
  color: rgb(255 255 255 / 40%);
}

.problem-card-blue .problem-card-desc,
.problem-card-dark .problem-card-desc {
  color: rgb(255 255 255 / 70%);
}

.problem-card-blue .problem-card-link,
.problem-card-dark .problem-card-link {
  color: #fff;
}

.problem-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

@media (max-width: 992px) {
  .problem-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .problem-card-grid {
    grid-template-columns: 1fr;
  }

  .problem-card {
    min-height: 200px;
  }
}

/* codenzic desktop stagger: middle column lifted, right column dropped. */
@media (min-width: 1024px) {
  .problem-card-cell:nth-child(3n + 2) {
    margin-top: -1.5rem;
  }

  .problem-card-cell:nth-child(3n) {
    margin-top: 1.25rem;
  }
}

/* ===== 11. STATS (rotated cards) ===== */
.tilt-l,
.tilt-r {
  transition: transform 300ms ease;
}

.tilt-l {
  transform: rotate(-2.2deg);
}

.tilt-r {
  transform: rotate(1.8deg);
}

.tilt-l:hover,
.tilt-r:hover {
  transform: rotate(0deg);
}

.stat-item {
  padding: 1.5rem 1.6rem;
  text-align: left;
}

.stat-item h3 {
  margin-bottom: 0.35rem;
  color: #1e5ce1;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-item p {
  margin: 0;
  color: #6e6e6e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ===== 12. SKILLS ===== */
.skills {
  background: #efefef;
}

.skill-item {
  border-color: var(--line);
  border-radius: 1.25rem;
}

.skill-item:hover {
  border-color: rgb(30 92 225 / 35%);
}

.skill-name {
  color: #171717;
  font-weight: 650;
}

.skill-percentage {
  color: #6e6e6e;
}

.skill-bar {
  height: 6px;
  background: #e3e3e3;
  border-radius: 999px;
}

.skill-progress {
  background: linear-gradient(90deg, #1e5ce1, #4f83ff);
  border-radius: 999px;
}

/* Two-column skills explorer, codenzic /services second-section style:
   50/50 grid -- the category list is set in Unbounded display type at the
   codenzic size ladder (1.6rem base, 2.1rem >= 640px, 2.5rem >= 1024px),
   so each column needs half the width. Hover previews the matching detail
   board; click/tap and keyboard focus do the same. */
.skills-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: start;
}

.skills-nav {
  display: flex;
  flex-direction: column;
  counter-reset: skill-tab;
  border-top: 1px solid var(--line);
}

.skill-tab {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  width: 100%;
  padding: clamp(1.1rem, 2.2vw, 1.5rem) 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  counter-increment: skill-tab;
}

.skill-tab::before {
  content: counter(skill-tab, decimal-leading-zero);
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  color: rgb(23 23 23 / 30%);
  transition: color 220ms ease;
}

.skill-tab-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: #171717;
  text-wrap: balance;
  transition: color 220ms ease, transform 300ms ease;
}

@media (min-width: 640px) {
  .skill-tab-name {
    font-size: 1.05rem;
  }
}

@media (min-width: 1024px) {
  .skill-tab-name {
    font-size: 1.25rem;
  }
}

.skill-tab:hover::before,
.skill-tab:focus-visible::before,
.skill-tab.active::before {
  color: #1e5ce1;
}

.skill-tab:hover .skill-tab-name,
.skill-tab:focus-visible .skill-tab-name,
.skill-tab.active .skill-tab-name {
  color: #1e5ce1;
}

.skill-tab:hover .skill-tab-name,
.skill-tab:focus-visible .skill-tab-name {
  transform: translateX(6px);
}

.skills-panels {
  min-width: 0;
}

.skill-panel {
  display: none;
}

.skill-panel.active {
  display: block;
  animation: skill-panel-in 320ms ease;
}

@keyframes skill-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Mobile: the category list becomes a horizontal chip row above the panel. */
@media (max-width: 992px) {
  .skills-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .skills-nav {
    flex-direction: row;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    border-top: 0;
  }

  .skill-tab {
    flex: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    /* Horizontal chip row: single-line chips, scrolling reveals the rest. */
    white-space: nowrap;
  }

  .skill-tab::before {
    font-size: 0.7rem;
  }

  .skill-tab-name {
    font-size: 0.88rem;
    letter-spacing: 0;
    line-height: 1.2;
  }

  .skill-tab:hover .skill-tab-name,
  .skill-tab:focus-visible .skill-tab-name {
    transform: none;
  }
}

/* ===== 13. EXPERIENCE ===== */
.experience-content {
  max-width: 1080px;
}

.experience-title {
  border-left: 3px solid #1e5ce1;
  color: #171717;
  letter-spacing: -0.03em;
}

.experience-item {
  margin-bottom: 1rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.experience-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.experience-position {
  color: #171717;
  letter-spacing: -0.025em;
}

.experience-company {
  color: #1e5ce1;
  font-weight: 600;
}

.experience-company a {
  color: #1e5ce1;
}

.experience-date {
  color: #4e4e4e;
}

.experience-location {
  color: #6e6e6e;
}

.experience-description {
  color: #4e4e4e;
}

.experience-description p {
  color: inherit;
}

/* ===== 14. TESTIMONIALS (dark cards) ===== */
.testimonial-item {
  position: relative;
  min-height: 320px;
  height: auto;
  padding: clamp(1.75rem, 3vw, 2.4rem);
  border: 0;
  border-radius: 1.5rem;
  background: var(--dark-gradient);
  box-shadow: 0 26px 60px rgb(10 25 57 / 28%);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.testimonial-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 34px 80px rgb(10 25 57 / 36%);
}

.testimonial-quote {
  margin-bottom: 1.5rem;
  color: rgb(255 255 255 / 88%);
  font-size: 1.02rem;
  font-style: normal;
  line-height: 1.7;
}

.testimonial-quote::before {
  display: block;
  margin-bottom: 0.9rem;
  color: #4f83ff;
  content: "\201C";
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 0.6;
}

.testimonial-avatar {
  border: 2px solid rgb(255 255 255 / 25%);
  border-radius: 50%;
}

.author-name {
  color: #fff;
  font-weight: 600;
}

.author-title {
  color: rgb(255 255 255 / 55%);
}

.testimonial-swiper {
  padding-bottom: 20px;
}

/* ===== 15. AI ADVISOR ===== */
.ai-advisor-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
}

.ai-advisor-eyebrow {
  margin-bottom: 0.9rem;
  color: #1e5ce1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ai-advisor-heading {
  max-width: 34rem;
}

.ai-advisor-heading .section-title {
  margin-bottom: 1rem;
  text-align: left;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.ai-advisor-heading .section-subtitle {
  margin: 0;
  text-align: left;
}

.ai-advisor-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 0;
  border-radius: 1.75rem;
  background: var(--dark-gradient);
  box-shadow: 0 30px 70px rgb(10 25 57 / 35%);
}

.ai-advisor-panel::after {
  position: absolute;
  top: -4rem;
  right: -3rem;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(30 92 225 / 45%), transparent 68%);
  content: "";
  pointer-events: none;
}

.ai-advisor-description {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
  color: rgb(255 255 255 / 82%);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.8;
}

.ai-advisor-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.ai-advisor-actions .btn {
  min-height: 50px;
  border-radius: 999px;
  font-weight: 600;
}

.ai-advisor-panel .btn-primary,
.ai-advisor-panel .btn {
  background: #fff;
  color: #171717;
}

.ai-advisor-panel .btn-primary:hover,
.ai-advisor-panel .btn:hover {
  background: #1e5ce1;
  color: #fff;
  transform: translateY(-2px);
}

.ai-advisor-note {
  margin: 0;
  color: rgb(255 255 255 / 45%);
  font-size: 0.85rem;
}

/* AI advisor chat page: dark rounded panel */
.ai-advisor-page-section {
  min-height: calc(100vh - 8rem);
}

.ai-advisor-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.ai-advisor-page-header .section-title {
  margin-bottom: 0.5rem;
  text-align: left;
}

.ai-advisor-page-header .section-subtitle {
  margin-bottom: 0;
  text-align: left;
}

.ai-advisor-page-header .btn-outline {
  flex-shrink: 0;
}

.ai-advisor-chat {
  display: flex;
  height: clamp(30rem, calc(100vh - 18rem), 50rem);
  min-height: 30rem;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 1.5rem;
  background: var(--dark-gradient);
  box-shadow: 0 30px 80px rgb(10 25 57 / 32%);
}

.ai-chat-messages {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 1.9rem);
  background: transparent;
}

.ai-chat-message {
  display: flex;
}

.ai-chat-message-user {
  justify-content: flex-end;
}

.ai-chat-message-assistant {
  justify-content: flex-start;
}

.ai-chat-bubble {
  max-width: min(78%, 52rem);
  padding: 0.85rem 1.1rem;
  border-radius: 1.15rem;
  font-size: 0.95rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: break-word;
}

.ai-chat-bubble-user {
  border-bottom-right-radius: 0.3rem;
  background: #1e5ce1;
  color: #fff;
}

.ai-chat-bubble-assistant {
  border: 0;
  border-bottom-left-radius: 0.3rem;
  background: #fff;
  color: #232323;
  box-shadow: 0 6px 24px rgb(0 0 0 / 30%);
}

.ai-chat-bubble p,
.ai-chat-bubble ul,
.ai-chat-bubble ol {
  margin-bottom: 0.55rem;
  color: inherit;
}

.ai-chat-bubble p:last-child,
.ai-chat-bubble ul:last-child,
.ai-chat-bubble ol:last-child {
  margin-bottom: 0;
}

.ai-chat-bubble ul,
.ai-chat-bubble ol {
  padding-left: 1.5rem;
}

.ai-chat-bubble li {
  margin-bottom: 0.25rem;
  color: inherit;
}

.ai-chat-bubble pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ai-chat-bubble code {
  overflow-wrap: break-word;
  word-break: break-word;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
  font-size: 0.88rem;
}

.ai-chat-bubble-assistant a {
  color: #1e5ce1;
}

.ai-chat-input-area {
  padding: 1rem clamp(1rem, 3vw, 1.5rem) 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
  background: rgb(255 255 255 / 4%);
}

.ai-chat-form {
  display: flex;
  gap: 0.75rem;
}

.ai-chat-input {
  min-width: 0;
  flex: 1;
  padding: 0.85rem 1.15rem;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
  color: #fff;
  font-size: 0.95rem;
}

.ai-chat-input::placeholder {
  color: rgb(255 255 255 / 40%);
}

.ai-chat-input:focus {
  border-color: #4f83ff;
  outline: 3px solid rgb(30 92 225 / 25%);
}

.ai-chat-submit {
  min-width: 5.75rem;
  padding: 0.8rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: #1e5ce1;
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 200ms ease, opacity 200ms ease;
}

.ai-chat-submit:hover:not(:disabled) {
  background: #1747b3;
}

.ai-chat-submit:disabled {
  cursor: wait;
}

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

/* ===== 16. BLOG META ===== */
.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  color: #6e6e6e;
  font-size: 0.82rem;
}

.blog-post-category {
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1e5ce1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ===== 17. ABOUT (home) ===== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-greeting {
  color: #171717;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.about-tagline {
  margin: 0.75rem 0 1.5rem;
  color: #171717;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.5;
}

.about-tagline em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: rgb(30 92 225 / 50%);
  text-underline-offset: 5px;
}

.about-tagline .accent {
  color: #1e5ce1;
}

.about-avatar {
  max-width: 280px;
  margin: 0 0 1.75rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.about-avatar img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.about-more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #171717;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: underline;
  text-decoration-color: rgb(23 23 23 / 28%);
  text-underline-offset: 4px;
}

.about-more:hover {
  color: #1e5ce1;
  text-decoration-color: #1e5ce1;
}

.about-more i {
  transition: transform 220ms ease;
}

.about-more:hover i {
  transform: translateX(4px);
}

.about-bio {
  color: #4e4e4e;
  font-size: 1.05rem;
  line-height: 1.85;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}

/* ===== 18. FOOTER (light, Let's Talk) ===== */
.footer {
  background: #f7f7f7;
  color: #171717;
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.25rem;
}

.footer-container {
  max-width: 1320px;
}

.footer-talk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: clamp(2rem, 5vw, 3.25rem);
  border-bottom: 1px solid var(--line);
}

.footer-talk-link {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.6rem);
  color: #171717;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 4.25rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-decoration: none;
}

.footer-talk-link:hover {
  color: #171717;
}

.footer-talk-arrow {
  display: grid;
  width: clamp(52px, 6vw, 64px);
  height: clamp(52px, 6vw, 64px);
  flex-shrink: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #171717;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  transition: background-color 240ms ease, border-color 240ms ease,
    color 240ms ease, transform 240ms ease;
}

.footer-talk-link:hover .footer-talk-arrow {
  background: #1e5ce1;
  border-color: #1e5ce1;
  color: #fff;
  transform: translateX(8px);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(2.25rem, 5vw, 3.25rem) 0;
}

.footer-heading {
  margin-bottom: 1.1rem;
  color: rgb(23 23 23 / 45%);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-email {
  display: inline-block;
  margin-bottom: 1rem;
  color: #171717;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  letter-spacing: -0.01em;
  word-break: break-word;
}

.footer-email:hover {
  color: #1e5ce1;
}

.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-contact-list li,
.footer-contact-list li > a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-contact-list a,
.footer-contact-list span {
  color: #4e4e4e;
  font-size: 0.95rem;
  transition: color 200ms ease;
}

.footer-contact-list a:hover {
  color: #1e5ce1;
}

.footer-contact-list i {
  width: 1em;
  color: #1e5ce1;
  text-align: center;
  flex: none;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.25rem;
}

.footer-links a {
  color: #4e4e4e;
  font-size: 0.95rem;
  transition: color 200ms ease;
}

.footer-links a:hover {
  color: #1e5ce1;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer-social a {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #171717;
  font-size: 1rem;
  transition: background-color 220ms ease, color 220ms ease,
    border-color 220ms ease, transform 220ms ease;
}

.footer-social a:hover {
  background: #171717;
  border-color: #171717;
  color: #fff;
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: rgb(23 23 23 / 45%);
  font-size: 0.85rem;
  text-align: left;
}

.footer-bottom p {
  margin: 0;
  color: rgb(23 23 23 / 45%);
}

/* ===== 19. BREADCRUMB ===== */
.breadcrumb-nav {
  margin: 0 0 1.75rem;
  font-size: 0.88rem;
}

.breadcrumb-item a {
  color: #6e6e6e;
}

.breadcrumb-item a:hover {
  color: #1e5ce1;
}

.breadcrumb-item [aria-current="page"] {
  color: #171717;
  opacity: 0.75;
}

.breadcrumb-sep {
  color: #9a9a9a;
}

/* ===== 20. FORMS ===== */
.form-group label {
  display: block;
  margin-bottom: 0.45rem;
  color: #171717;
  font-weight: 600;
  font-size: 0.88rem;
}

.form-group input,
.form-group textarea {
  background: #fff;
  border: 1.5px solid rgb(23 23 23 / 14%);
  border-radius: 0.9rem;
  color: #171717;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #1e5ce1;
  box-shadow: 0 0 0 4px rgb(30 92 225 / 12%);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9a9a9a;
}

/* Modals stay dark (near-black panels, blue focus). style.css drives them
   with ID selectors + !important, so only the focus colour needed fixing. */
#contact-modal .form-group input:focus,
#contact-modal .form-group textarea:focus,
#login-modal .form-group input:focus,
#signup-modal .form-group input:focus,
#password-reset-modal .form-group input:focus,
#change-password-modal .form-group input:focus,
#change-email-modal .form-group input:focus {
  border-color: #1e5ce1 !important;
  box-shadow: 0 0 0 3px rgb(30 92 225 / 28%) !important;
}

.modal-overlay,
#contact-modal,
#login-modal,
#signup-modal,
#password-reset-modal,
#change-password-modal,
#change-email-modal {
  background: rgb(10 10 10 / 64%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#contact-modal .modal-content,
#login-modal .modal-content,
#signup-modal .modal-content,
#password-reset-modal .modal-content,
#change-password-modal .modal-content,
#change-email-modal .modal-content {
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 1.25rem;
}

#contact-modal .btn-primary,
#login-modal .btn-primary,
#signup-modal .btn-primary,
#password-reset-modal .btn-primary,
#change-password-modal .btn-primary,
#change-email-modal .btn-primary {
  background: #1e5ce1;
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: 999px;
}

#contact-modal .btn-primary:hover,
#login-modal .btn-primary:hover,
#signup-modal .btn-primary:hover,
#password-reset-modal .btn-primary:hover,
#change-password-modal .btn-primary:hover,
#change-email-modal .btn-primary:hover {
  background: #1747b3;
  color: #fff;
  opacity: 1;
}

.form-reassurance {
  color: #c9c9c9;
}

.captcha-image {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
}

.captcha-refresh-btn {
  background: #fff !important;
  color: #171717 !important;
  border: 1px solid var(--line-strong);
  border-radius: 999px !important;
}

.captcha-refresh-btn:hover {
  background: #f7f7f7 !important;
}

.captcha-refresh-btn i {
  color: #171717 !important;
}

.captcha-input input {
  border: 1.5px solid rgb(23 23 23 / 14%);
  border-radius: 0.9rem;
  background: #fff;
}

.captcha-input input:focus {
  border-color: #1e5ce1;
  box-shadow: 0 0 0 4px rgb(30 92 225 / 12%);
  outline: none;
}

.form-messages {
  border-radius: 0.9rem;
}

/* ===== 21. TOASTS ===== */
.message {
  border-radius: 1rem;
  border-left: 4px solid #1e5ce1;
}

.message-icon {
  color: #1e5ce1;
}

/* ===== 22. FLOATING UI ===== */
.scroll-top {
  background: #171717;
  color: #fff;
  border: 1px solid rgb(23 23 23 / 12%);
  box-shadow: 0 10px 26px rgb(23 23 23 / 18%);
}

.scroll-top:hover {
  background: #1e5ce1;
}

.whatsapp-float {
  box-shadow: 0 12px 30px rgb(37 211 102 / 35%);
}

/* ===== 23. ACCOUNT DROPDOWN (desktop) ===== */
.account-dropdown-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 24px 60px rgb(23 23 23 / 14%);
  padding: 0.5rem;
  min-width: 210px;
}

.account-dropdown-item {
  padding: 0.6rem 0.85rem;
  border-radius: 0.6rem;
  color: #171717;
  font-size: 0.9rem;
  font-weight: 500;
}

.account-dropdown-item:hover {
  background: #f7f7f7;
  color: #1e5ce1;
}

.account-dropdown-divider {
  height: 1px;
  margin: 0.4rem 0.25rem;
  background: var(--line);
}

/* ===== 24. PAGE THEMES (flip style.css dark themes to light) ===== */
.home-page,
.modern-page,
.services-page,
.projects-page,
.blog-page,
.ai-advisor-page,
.career-page {
  background: #f7f7f7;
  color: #232323;
}

.home-page .about,
.home-page .services-section,
.home-page .projects,
.home-page .experience,
.home-page .testimonials,
.home-page .contact,
.modern-page #blog-list,
.modern-page #all-projects,
.modern-page #services-list,
.modern-page #problems-list,
.modern-page .ai-advisor-page-section,
.modern-page .blog-list-page,
.modern-page .projects,
.modern-page .service-offerings-section {
  background: #f7f7f7;
  color: #232323;
}

.home-page .skills {
  background: #efefef;
  color: #232323;
}

.home-page .section-title,
.modern-page .section-title,
.services-page .section-title,
.projects-page .section-title,
.blog-page .section-title {
  color: #171717;
}

.home-page .section-subtitle,
.modern-page .section-subtitle,
.services-page .section-subtitle,
.projects-page .section-subtitle,
.blog-page .section-subtitle {
  color: #6e6e6e;
}

.home-page .about-text p {
  color: #4e4e4e;
  font-size: 1.05rem;
  line-height: 1.85;
}

.home-page .about-text strong,
.home-page .about-text b {
  color: #171717;
  font-weight: 700;
}

.home-page .stat-item,
.home-page .skill-item,
.home-page .skill-children .skill-item,
.modern-page .stat-item {
  background: #fff;
  border-color: var(--line);
}

.home-page .stat-item h3,
.modern-page .stat-item h3 {
  color: #1e5ce1;
}

.home-page .stat-item p,
.modern-page .stat-item p {
  color: #6e6e6e;
}

.home-page .skill-name {
  color: #171717;
}

.home-page .skill-percentage {
  color: #6e6e6e;
}

.home-page .skill-bar,
.modern-page .skill-bar {
  background: #e3e3e3;
}

.home-page .service-card,
.home-page .project-card,
.modern-page .project-card,
.modern-page .service-card {
  background: #fff;
  border-color: var(--line);
}

.home-page .service-card h2,
.home-page .project-title,
.home-page .project-title a,
.modern-page .project-title,
.modern-page .project-title a,
.modern-page .service-card h2,
.modern-page .service-card h2 a {
  color: #171717;
}

.home-page .project-title a:hover,
.modern-page .project-title a:hover,
.modern-page .service-card h2 a:hover {
  color: #1e5ce1;
}

.home-page .service-card-intro,
.home-page .project-description,
.modern-page .project-description,
.modern-page .service-card-intro {
  color: #6e6e6e;
  line-height: 1.7;
}

.home-page .tech-tag,
.modern-page .tech-tag {
  background: #fff;
  border-color: var(--line);
  color: #4e4e4e;
}

.home-page .read-more-link,
.modern-page .read-more-link,
.services-page .read-more-link,
.projects-page .read-more-link,
.blog-page .read-more-link {
  color: #1e5ce1;
}

.home-page .project-placeholder,
.modern-page .project-placeholder,
.modern-page .projects-placeholder,
.projects-page .project-placeholder,
.services-page .project-placeholder,
.blog-page .project-placeholder {
  border-color: var(--line);
  background: #ededed;
  color: #9a9a9a;
}

.home-page .experience-title,
.home-page .experience-position {
  color: #171717;
}

.home-page .experience-item {
  border-bottom: none;
}

.home-page .experience-date {
  color: #4e4e4e;
}

.home-page .experience-location {
  color: #6e6e6e;
}

.home-page .experience-description {
  color: #4e4e4e;
}

.home-page .blog-post-meta,
.modern-page .blog-post-meta {
  color: #6e6e6e;
}

.home-page #recent-blog .blog-post-category,
.modern-page .blog-post-category {
  background: var(--blue-soft);
  color: #1e5ce1;
}

.home-page #projects .project-content,
.home-page #recent-blog .project-content,
.modern-page .project-card .project-content {
  padding: clamp(1.15rem, 2vw, 1.5rem);
}

.home-page #projects .project-title,
.home-page #recent-blog .project-title {
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  line-height: 1.35;
  text-wrap: balance;
}

.modern-page .blog-list-page,
.modern-page .projects,
.modern-page .ai-advisor-page-section {
  padding: clamp(2.75rem, 6vw, 5rem) 0;
}

.modern-page .section-header {
  margin-bottom: 2rem;
}

.modern-page .projects-grid {
  gap: clamp(1rem, 2.2vw, 1.5rem);
}

.modern-page .project-login-note {
  margin-top: 0.5rem;
  color: #4e4e4e;
  font-size: 0.84rem;
}

.modern-page .project-login-note i {
  margin-right: 0.4em;
}

.modern-page .project-link,
.modern-page .project-link:hover {
  color: #1e5ce1;
}

.modern-page .project-technologies {
  padding-top: 1rem;
}

.modern-page .page-list-cta {
  margin-top: 2.5rem;
  text-align: center;
}

.modern-page .page-list-cta .btn {
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
}

.modern-page .page-feature-grid {
  margin-top: 1.5rem;
}

.modern-page .home-feature-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  background: #fff;
}

.modern-page .home-feature-card .service-card-link {
  align-self: flex-end;
  margin-top: auto;
  padding-top: 0.8rem;
  color: #1e5ce1;
}

/* ===== 25. DETAIL PAGES ===== */
.modern-page .problem-detail-page,
.modern-page .service-detail-page,
.modern-page .project-detail-page,
.modern-page .blog-post-detail-page {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  background: #f7f7f7;
  color: #232323;
}

.modern-page .service-detail-page .blog-post-article,
.modern-page .project-detail-page .blog-post-article,
.modern-page .blog-post-detail-page .blog-post-article,
.problem-detail-article {
  max-width: 1080px;
}

.modern-page .service-detail-page .blog-post-header,
.modern-page .project-detail-page .blog-post-header,
.modern-page .blog-detail-header {
  margin-bottom: 2rem;
  border-color: var(--line);
}

.modern-page .service-detail-page .blog-post-title,
.modern-page .project-detail-page .blog-post-title,
.modern-page .blog-detail-header .blog-post-title,
.problem-detail-header .blog-post-title {
  color: #171717;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.6vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

.problem-detail-article {
  max-width: 1080px;
  margin: 0 auto;
}

.problem-detail-header {
  margin: 0 0 2.5rem;
}

.problem-detail-lead {
  margin: 0;
  color: #6e6e6e;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.problem-detail-copy {
  max-width: none;
  margin: 0;
}

.modern-page .problem-detail-content {
  padding: 0;
  color: #232323;
}

.modern-page .problem-detail-copy p,
.modern-page .problem-detail-content p {
  color: #4e4e4e;
  line-height: 1.85;
}

.modern-page .problem-detail-copy h1,
.modern-page .problem-detail-copy h2,
.modern-page .problem-detail-copy h3,
.modern-page .problem-detail-copy h4,
.modern-page .problem-detail-content h1,
.modern-page .problem-detail-content h2,
.modern-page .problem-detail-content h3,
.modern-page .problem-detail-content h4 {
  color: #171717;
}

.modern-page .problem-detail-content a {
  color: #1e5ce1;
}

.problem-detail-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.modern-page .problem-detail-content .problem-insight-card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-left: 3px solid #1e5ce1;
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.modern-page .problem-detail-content .problem-insight-impact {
  border-left-color: #e27d70;
}

.modern-page .problem-detail-content .problem-insight-card h2 {
  margin: 0 0 0.75rem;
  color: #171717;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.modern-page .problem-detail-content .problem-insight-card p {
  margin: 0;
  white-space: pre-line;
}

.modern-page .problem-detail-content .problem-related-section {
  margin: 3rem 0 0;
  padding: 0;
}

.problem-related-section > h2 {
  margin-bottom: 1.25rem;
  color: #171717;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.025em;
}

.problem-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.25rem;
}

.modern-page .problem-related-card {
  display: flex;
  min-height: 200px;
  flex-direction: column;
  padding: 1.5rem;
}

.modern-page .problem-related-card h3,
.modern-page .problem-related-card h3 a {
  color: #171717;
}

.modern-page .problem-related-card h3 {
  margin-bottom: 0.65rem;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.modern-page .problem-related-card .service-card-intro {
  flex: 1;
  margin-bottom: 1rem;
}

.modern-page .problem-related-card .read-more-link {
  align-self: flex-end;
  margin-top: auto;
}

.modern-page .problem-detail-cta {
  margin: 3rem 0 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.modern-page .problem-detail-cta h2 {
  margin-bottom: 0.5rem;
  color: #171717;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.modern-page .problem-detail-cta p {
  margin-bottom: 1.25rem;
  color: #6e6e6e;
}

.modern-page .problem-detail-cta .service-card-btn {
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #171717;
  color: #fff;
  font-weight: 600;
}

.modern-page .problem-detail-cta .service-card-btn:hover {
  background: #1e5ce1;
}

.problem-detail-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.problem-detail-bottom-nav a {
  color: #1e5ce1;
  font-weight: 600;
  text-decoration: none;
}

.problem-detail-bottom-nav a:hover {
  color: #1747b3;
  text-decoration: underline;
}

/* --- Service detail --- */
.modern-page .service-detail-page .blog-post-content,
.modern-page .project-detail-page .blog-post-content {
  padding: 0;
  color: #232323;
}

.modern-page .service-detail-page .blog-post-content p,
.modern-page .service-detail-page .service-section p,
.modern-page .project-detail-page .blog-post-content p,
.modern-page .project-detail-page .case-study-body,
.modern-page .project-detail-page .case-study-body p,
.modern-page .blog-detail-content p {
  color: #4e4e4e;
  line-height: 1.85;
}

.modern-page .service-detail-page .blog-post-content h1,
.modern-page .service-detail-page .blog-post-content h2,
.modern-page .service-detail-page .blog-post-content h3,
.modern-page .project-detail-page .blog-post-content h1,
.modern-page .project-detail-page .blog-post-content h2,
.modern-page .project-detail-page .blog-post-content h3,
.modern-page .blog-detail-content h1,
.modern-page .blog-detail-content h2,
.modern-page .blog-detail-content h3,
.modern-page .blog-detail-content h4 {
  color: #171717;
}

.modern-page .service-detail-page .blog-post-content a,
.modern-page .project-detail-page .blog-post-content a,
.modern-page .blog-detail-content a {
  color: #1e5ce1;
  text-underline-offset: 0.15em;
}

.modern-page .service-detail-page .service-intro {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgb(30 92 225 / 18%);
  border-left: 3px solid #1e5ce1;
  border-radius: 0 1rem 1rem 0;
  background: var(--blue-soft);
  color: #232323;
  font-size: 1.08rem;
  line-height: 1.75;
}

.modern-page .service-detail-page .service-section {
  margin: 0 0 1rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.modern-page .service-detail-page .service-section h2 {
  margin-bottom: 0.65rem;
  color: #171717;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.modern-page .service-detail-page .service-section p {
  margin-bottom: 0;
}

.modern-page .service-detail-page .service-cta {
  margin: 2.5rem 0;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 0;
  border-radius: 1.5rem;
  background: var(--dark-gradient);
  box-shadow: 0 26px 60px rgb(10 25 57 / 30%);
  text-align: center;
}

.modern-page .service-detail-page .service-cta h3 {
  color: #fff;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}

.modern-page .service-detail-page .service-cta p {
  color: rgb(255 255 255 / 65%);
}

.modern-page .service-detail-page .service-cta .btn,
.modern-page .service-detail-page .service-cta .service-card-btn {
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #171717;
  font-weight: 600;
}

.modern-page .service-detail-page .service-cta .btn:hover,
.modern-page .service-detail-page .service-cta .service-card-btn:hover {
  background: #1e5ce1;
  color: #fff;
}

.modern-page .service-related-links,
.modern-page .service-detail-faq {
  margin: 2.5rem 0 0;
}

.modern-page .service-related-links h2 {
  margin-bottom: 1rem;
  color: #171717;
  font-size: 1.4rem;
}

.modern-page .service-related-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.modern-page .service-related-links li {
  margin: 0;
  padding: 0;
  position: static;
}

.modern-page .service-related-links li::before {
  content: none;
}

.modern-page .service-related-links a {
  display: inline-flex;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #1e5ce1;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.modern-page .service-related-links a:hover {
  border-color: #1e5ce1;
  background: var(--blue-soft);
}

.modern-page .service-detail-divider {
  margin: 2.5rem 0;
  border-color: var(--line);
  opacity: 1;
}

.modern-page .service-detail-bottom-nav {
  display: flex;
  justify-content: center;
  gap: 1rem 2rem;
  margin: 2rem 0 0;
  text-align: center;
}

.modern-page .service-detail-bottom-nav a {
  color: #1e5ce1;
  font-weight: 600;
  text-decoration: none;
}

.modern-page .service-detail-bottom-nav a:hover {
  color: #1747b3;
  text-decoration: underline;
}

/* --- FAQ dark container + JS accordion --- */
.faq-dark {
  padding: clamp(1.6rem, 4vw, 2.75rem);
  border-radius: 1.75rem;
  background: var(--dark-gradient);
  box-shadow: 0 26px 60px rgb(10 25 57 / 28%);
}

.faq-dark > h2 {
  margin-bottom: 0.4rem;
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.025em;
}

.faq-dark .faq-intro {
  margin-bottom: 1rem;
  color: rgb(255 255 255 / 55%);
  font-size: 0.95rem;
}

.faq-dark .faq-item {
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.faq-dark .faq-item:last-child {
  border-bottom: 0;
}

.faq-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.15rem 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: rgb(255 255 255 / 88%);
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.5;
  transition: color 200ms ease;
}

.faq-toggle:hover {
  color: #fff;
}

.faq-toggle:focus-visible {
  outline: 2px solid #4f83ff;
  outline-offset: 4px;
}

.faq-toggle .faq-icon {
  flex-shrink: 0;
  color: rgb(255 255 255 / 55%);
  font-size: 0.9rem;
  transition: transform 280ms ease, color 280ms ease;
}

.faq-item.open .faq-toggle .faq-icon {
  color: #4f83ff;
  transform: rotate(45deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms ease;
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer p {
  margin: 0;
  padding-bottom: 1.15rem;
  color: rgb(255 255 255 / 62%);
  font-size: 0.94rem;
  line-height: 1.75;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}

/* --- Project detail --- */
.modern-page .project-detail-back-link {
  display: inline-block;
  margin-bottom: 1.5rem !important;
  color: #1e5ce1;
}

.modern-page .project-detail-back-link:hover {
  color: #1747b3;
}

.modern-page .project-detail-page .blog-post-header {
  margin-bottom: 1.5rem;
}

.modern-page .project-detail-technologies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
  color: #4e4e4e;
}

.modern-page .project-detail-technologies > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.modern-page .project-detail-page .project-links-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.modern-page .project-detail-page .project-links-row .project-link {
  display: inline-flex;
  width: auto;
  height: auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #171717;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 200ms ease, background-color 200ms ease,
    color 200ms ease, transform 200ms ease;
}

.modern-page .project-detail-page .project-links-row .project-link:hover {
  border-color: #1e5ce1;
  background: var(--blue-soft);
  color: #1e5ce1;
  transform: translateY(-1px);
}

.modern-page .project-detail-login {
  margin-top: 0.5rem;
  color: #4e4e4e;
  text-align: center;
}

.modern-page .project-detail-login i {
  margin-right: 0.4em;
}

.modern-page .project-detail-page .blog-post-image-container,
.modern-page .blog-detail-image {
  height: clamp(16rem, 55vw, 34rem);
  max-height: 34rem;
  margin: 1.5rem auto;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: #ededed;
  overflow: hidden;
}

.modern-page .project-detail-page .blog-post-featured-image {
  max-height: 34rem;
  object-fit: contain;
}

.modern-page .project-detail-page .project-thumbnails {
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.modern-page .project-detail-page .project-thumbnail {
  width: 68px;
  height: 68px;
  border: 2px solid var(--line);
  border-radius: 0.75rem;
}

.modern-page .project-detail-page .project-thumbnail:hover,
.modern-page .project-detail-page .project-thumbnail.active {
  border-color: #1e5ce1;
  box-shadow: 0 6px 18px rgb(30 92 225 / 18%);
}

.modern-page .case-study-lede {
  max-width: none;
  color: #6e6e6e;
}

.modern-page .case-study-meta,
.modern-page .case-study-metric {
  border-color: var(--line);
  background: #fff;
}

.modern-page .case-study-meta dt,
.modern-page .case-study-metric .label {
  color: #6e6e6e;
}

.modern-page .case-study-meta dd {
  color: #232323;
}

.modern-page .case-study-metric {
  border-top: 3px solid #1e5ce1;
}

.modern-page .case-study-metric .value,
.modern-page .case-study-section h2 i {
  color: #1e5ce1;
}

.modern-page .case-study-section h2 {
  border-bottom-color: var(--line);
  color: #171717;
}

.modern-page .case-study-decisions li {
  border-left-color: rgb(30 92 225 / 35%);
  background: #fff;
  color: #232323;
}

.modern-page .case-study-decisions li::before {
  color: #1e5ce1;
}

.modern-page .case-study-cta {
  border: 0;
  border-radius: 1.5rem;
  background: var(--dark-gradient);
}

.modern-page .case-study-cta h3 {
  color: #fff;
}

.modern-page .case-study-cta p {
  color: rgb(255 255 255 / 65%);
}

.modern-page .case-study-cta-actions .btn {
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #171717;
}

.modern-page .case-study-cta-actions .btn:hover {
  background: #1e5ce1;
  color: #fff;
}

.modern-page .case-study-cta-actions .btn-outline {
  background: transparent;
  border: 1.5px solid rgb(255 255 255 / 35%);
  color: #fff;
}

.modern-page .case-study-cta-actions .btn-outline:hover {
  border-color: #fff;
  background: #fff;
  color: #171717;
}

/* --- Blog detail --- */
.modern-page .blog-detail-header {
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.modern-page .blog-detail-header .blog-post-meta {
  justify-content: center;
}

.modern-page .blog-detail-header .blog-post-meta a {
  text-decoration: none;
}

.modern-page .blog-detail-image {
  max-width: none;
}

.modern-page .blog-detail-image .blog-post-featured-image {
  width: 100%;
  height: auto;
  max-height: 34rem;
  object-fit: cover;
}

.modern-page .blog-detail-content {
  margin: 0;
  padding: 0;
  color: #232323;
  font-size: 1.02rem;
  line-height: 1.8;
}

.modern-page .blog-detail-content p,
.modern-page .blog-detail-content li {
  color: #4e4e4e;
  line-height: 1.8;
}

.modern-page .blog-detail-content strong {
  color: #171717;
}

.modern-page .blog-detail-content h2 {
  margin-top: 2rem;
  letter-spacing: -0.025em;
}

.modern-page .blog-detail-content blockquote {
  border-left-color: #1e5ce1;
  color: #4e4e4e;
}

.modern-page .blog-detail-content code {
  border-radius: 0.35rem;
  background: #efefef;
  color: #1747b3;
}

.modern-page .blog-detail-content pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #0d1526;
  color: #e3e9f5;
}

.modern-page .blog-detail-content pre code {
  background: transparent;
  color: inherit;
}

.modern-page .blog-comments-section {
  /* Sits outside .blog-post-article (direct child of .container), so it needs
     its own width cap to align with the 1080px article column above it. */
  max-width: 1080px;
  margin: 3.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.modern-page .blog-comments-title {
  margin-bottom: 1.25rem;
  color: #171717;
  font-size: 1.4rem;
}

.modern-page .blog-comments-title i {
  margin-right: 0.5rem;
  color: #1e5ce1;
}

.modern-page .comments-list {
  margin-bottom: 2rem;
}

.modern-page .comment-item,
.modern-page .comment-form-wrapper,
.modern-page .login-prompt {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.modern-page .comment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.modern-page .comment-avatar {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: #1e5ce1;
  font-size: 0.875rem;
  font-weight: 700;
}

.modern-page .comment-author-name {
  color: #171717;
}

.modern-page .comment-date {
  display: block;
  color: #6e6e6e;
  font-size: 0.8rem;
}

.modern-page .comment-text,
.modern-page .comments-empty {
  margin: 0;
  color: #4e4e4e;
  line-height: 1.7;
}

.modern-page .comments-empty {
  margin-bottom: 1.5rem;
}

.modern-page .comment-form-wrapper h3 {
  margin-bottom: 1rem;
  color: #171717;
  font-size: 1.15rem;
}

.modern-page .blog-comment-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 1rem;
  border: 1.5px solid rgb(23 23 23 / 14%);
  border-radius: 0.9rem;
  background: #fff;
  color: #171717;
}

.modern-page .blog-comment-input:focus {
  border-color: #1e5ce1;
  outline: 3px solid rgb(30 92 225 / 12%);
}

.modern-page .blog-comment-submit,
.modern-page .blog-login-btn {
  border: 0;
  border-radius: 999px;
  background: #171717;
  color: #fff;
  font-weight: 600;
}

.modern-page .blog-comment-submit:hover,
.modern-page .blog-login-btn:hover {
  background: #1e5ce1;
}

.modern-page .blog-signup-btn {
  border: 0;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1e5ce1;
  font-weight: 700;
}

.modern-page .blog-signup-btn:hover {
  background: #1e5ce1;
  color: #fff;
}

.modern-page .login-prompt {
  text-align: center;
}

.modern-page .login-prompt-text {
  margin-bottom: 1rem;
  color: #4e4e4e;
}

.modern-page .login-prompt-text i {
  margin-right: 0.5rem;
  color: #1e5ce1;
}

.modern-page .login-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

/* ===== 26. CONTACT PAGE ===== */
.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-lead {
  max-width: 46ch;
  color: #4e4e4e;
  font-size: 1.05rem;
  line-height: 1.8;
}

.contact-rows {
  list-style: none;
  margin: 1.75rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-rows li,
.contact-rows li > a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.contact-rows i {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: #1e5ce1;
}

.contact-rows a,
.contact-rows span {
  color: #171717;
  font-weight: 500;
}

.contact-rows a:hover {
  color: #1e5ce1;
}

.contact-form-card {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.contact-form-card button[type="submit"] {
  width: 100%;
}

.contact-form-card .form-messages {
  margin-top: 1rem;
}

/* ===== 27. SCROLL REVEAL ===== */
/* main.js adds .reveal-init on load, then .revealed when in view. Without
   JS the elements never receive .reveal-init and stay fully visible. */
.reveal-init {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 620ms ease, transform 620ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-init.revealed {
  opacity: 1;
  transform: none;
}

/* ===== 28. DASHBOARD SUPPORT (leads / analytics / career) ===== */
/* analytics.css consumes the var() tokens, so the palette swap flows through
   automatically. These rules align the shared chrome with the new system. */
.analytics-header .section-title {
  color: #171717;
}

.analytics-window a,
.analytics-nav a {
  border-radius: 999px;
}

.analytics-window a.is-active,
.analytics-nav a.is-active {
  background: #1e5ce1;
  border-color: #1e5ce1;
  color: #fff;
}

/* ===== 29. RESPONSIVE ===== */
@media (max-width: 1080px) {
  .problem-solutions-section .services-grid,
  .service-offerings-section .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-quick-links {
    order: 2;
    max-width: 560px;
  }

  .about-grid,
  .contact-hero,
  .ai-advisor-layout {
    grid-template-columns: 1fr;
  }

  .ai-advisor-layout {
    gap: 2rem;
  }

  .ai-advisor-heading {
    max-width: 38rem;
  }
}

@media (max-width: 992px) {
  .hero-display {
    font-size: clamp(2rem, 9vw, 4rem);
  }

  .about-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-talk-link {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }
}

@media (max-width: 768px) {
  section {
    padding: clamp(3rem, 8vw, 4.5rem) 0;
  }

  .services-grid,
  .projects-grid,
  .blog-grid {
    gap: 1rem;
  }

  .problem-solutions-section .services-grid,
  .service-offerings-section .services-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-stats {
    gap: 0.8rem;
  }

  .modern-page .blog-list-page,
  .modern-page .projects,
  .modern-page .ai-advisor-page-section {
    padding: 2.75rem 0;
  }

  .modern-page .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-advisor-page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .ai-advisor-chat {
    height: clamp(26rem, 58vh, 38rem);
    min-height: 26rem;
  }

  .ai-chat-bubble {
    max-width: 88%;
  }

  .contact-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .service-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
  }

  .service-row-arrow {
    display: none;
  }

  .service-row-title {
    font-size: 1.15rem;
  }

  .modern-page .service-detail-bottom-nav {
    flex-direction: column;
  }

  .modern-page .project-detail-page .blog-post-image-container,
  .modern-page .blog-detail-image {
    height: clamp(14rem, 70vw, 24rem);
  }

  .modern-page .project-detail-technologies > span {
    gap: 0.3rem;
  }
}

@media (max-width: 560px) {
  .projects-grid,
  .services-grid,
  .blog-grid,
  .modern-page .projects-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-quick-links {
    grid-template-columns: 1fr;
  }

  .ai-advisor-page-header .section-title {
    font-size: clamp(1.6rem, 9vw, 2.4rem);
  }

  .ai-chat-form {
    gap: 0.5rem;
  }

  .ai-chat-input {
    padding: 0.75rem 0.9rem;
  }

  .ai-chat-submit {
    min-width: 4.5rem;
    padding: 0.65rem 0.85rem;
  }

  .problem-detail-bottom-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-feature-card .service-card-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    top: calc(72px + env(safe-area-inset-top, 0px));
    height: calc(100dvh - 84px - env(safe-area-inset-top, 0px));
  }

  .hero-typo {
    min-height: auto;
  }

  .hero-display {
    font-size: clamp(1.7rem, 10vw, 2.5rem);
  }

  .footer-talk {
    padding-bottom: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== 30. REDUCED MOTION + PRINT ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-init {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .hero-typo::before,
  .hero-typo::after {
    display: none;
  }
}
