:root {
  --ink: #101114;
  --muted: #585f6b;
  --line: #d9dde4;
  --paper: #ffffff;
  --soft: #f6f7f9;
  --brand: #7fa2dc;
  --brand-dark: #496caa;
  --shadow: 0 18px 50px rgba(16, 17, 20, 0.1);
  --radius: 18px;
  --max: 1120px;
  --header-h: 78px;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --container-pad: clamp(14px, 3vw, 28px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid rgba(73, 108, 170, .34);
  outline-offset: 3px;
}

p { margin: 0 0 1rem; }
ul, ol { margin-top: 0; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 700;
}

.container {
  width: min(calc(100% - (var(--container-pad) * 2)), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: #000;
  color: #fff;
  transition: top 120ms ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Header / navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(217, 221, 228, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
}

.navbar {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 28px);
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: clamp(142px, 14vw, 170px);
}
.logo img {
  width: 100%;
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  min-width: 48px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  cursor: pointer;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.55vw, 22px);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: clamp(.82rem, .9vw, .92rem);
  color: #151515;
}
.nav-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 0 7px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav-menu a[aria-current="page"],
.nav-menu a:hover,
.nav-menu a:focus-visible { border-color: var(--brand); }

/* Shared section system */
main > section {
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}

.section {
  padding-block: clamp(58px, 7vw, 88px);
  display: flex;
  align-items: center;
}
.section > .container { width: min(calc(100% - (var(--container-pad) * 2)), var(--max)); }
.section.soft { background: var(--soft); }

.section-header {
  max-width: 760px;
  margin-bottom: clamp(26px, 4vw, 40px);
}
.section-header.center {
  margin-inline: auto;
  text-align: center;
}
.section-title {
  font-size: clamp(2rem, 4.25vw, 3.65rem);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.section-lead {
  max-width: 72ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--brand-dark);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: clamp(.72rem, 1vw, .78rem);
}
.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 34px;
  height: 1px;
  background: var(--brand);
}

/* Home hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(255,255,255,.95), rgba(247,249,253,.96));
}
.hero-grid {
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 4vw, 54px);
  align-items: center;
  padding-block: clamp(42px, 6vh, 68px);
}
.hero-copy { max-width: 530px; }
.hero-subtitle {
  margin: 10px 0 20px;
  color: #25272c;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}
.hero-text {
  max-width: 64ch;
  color: var(--muted);
  font-size: clamp(.98rem, 1.25vw, 1.04rem);
}
.hero-media {
  position: relative;
  min-width: 0;
  padding: 0 18px 18px 0;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 22px 0 0 34px;
  border: 1px solid rgba(127, 162, 220, .42);
  border-radius: 42px;
  pointer-events: none;
}
.hero-media img {
  position: relative;
  width: 100%;
  aspect-ratio: 953 / 620;
  max-height: min(58vh, 520px);
  object-fit: cover;
  object-position: center;
  border-radius: 42px;
  box-shadow: var(--shadow);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  max-width: 100%;
  padding: 12px 20px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}
.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  color: #fff;
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}
.button.secondary {
  color: #111;
  background: #fff;
  border-color: var(--line);
}
.button.secondary:hover,
.button.secondary:focus-visible {
  color: var(--brand-dark);
  background: var(--soft);
}

/* Cards */
.cards,
.service-grid,
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
  align-items: stretch;
}
.card,
.cert-card {
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(217, 221, 228, .9);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(16, 17, 20, .06);
}
.card {
  display: flex;
  flex-direction: column;
}
.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: clamp(18px, 2vw, 24px);
}
.card h3 {
  margin-bottom: 12px;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.card p {
  color: var(--muted);
  font-size: clamp(.92rem, 1.1vw, .98rem);
}
.text-link {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  font-weight: 700;
  color: var(--brand-dark);
}

/* Home services: keep six cards usable without forcing a fixed height */
.home-services { align-items: flex-start; }
.home-services .container { padding-block: clamp(12px, 2vh, 28px); }
.home-services .card-image { aspect-ratio: 16 / 8; }

/* Split content */
.split {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(34px, 4vw, 54px);
  align-items: center;
}
.split > * { min-width: 0; }
.split img {
  width: 100%;
  max-height: min(70vh, 620px);
  object-fit: cover;
  object-position: center;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.check-list li {
  position: relative;
  min-width: 0;
  padding-left: 24px;
  color: var(--muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .67em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* Inner-page hero */
.page-hero {
  padding-block: clamp(50px, 7vw, 76px);
  display: flex;
  align-items: center;
  background: var(--soft);
}
.page-hero > .container { width: min(calc(100% - (var(--container-pad) * 2)), var(--max)); }
.page-hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 4vw, 48px);
  align-items: center;
}
.page-hero-grid > * { min-width: 0; }
.page-hero img {
  width: 100%;
  max-height: min(58vh, 460px);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

/* Services */
.service-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}
.service-card img {
  width: 100%;
  aspect-ratio: 1.95 / 1;
  object-fit: cover;
  object-position: center;
}
.service-card .card-body { display: flex; flex-direction: column; flex: 1; }
.service-card .text-link { margin-top: auto; }

/* Certifications */
.cert-card {
  padding: clamp(20px, 2.5vw, 28px);
  text-align: center;
}
.cert-card img {
  width: clamp(110px, 12vw, 150px);
  height: clamp(110px, 12vw, 150px);
  margin: 0 auto 20px;
  object-fit: contain;
}
.cert-card h3 { overflow-wrap: anywhere; }

/* Blog */
.blog-list { display: grid; gap: 22px; }
.blog-card {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.blog-card > img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  object-position: center;
}
.blog-card .card-body { padding: clamp(20px, 3vw, 28px); }
.blog-card h2 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); overflow-wrap: anywhere; }
.blog-card h2 a:hover,
.blog-card h2 a:focus-visible { color: var(--brand-dark); }
.blog-meta {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: .9rem;
}

.post-page {
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(44px, 6vw, 84px);
  background: #fff;
}
.post-container {
  width: min(calc(100% - (var(--container-pad) * 2)), 880px);
  margin-inline: auto;
}
.post-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-bottom: 28px;
  color: var(--brand-dark);
  font-weight: 700;
}
.post-header h1 {
  margin-bottom: 14px;
  font-size: clamp(2.05rem, 5vw, 4.6rem);
  overflow-wrap: anywhere;
}
.post-hero-image,
.post-inline-image {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  object-position: center;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.post-hero-image { margin: 32px 0; }
.post-inline-image { margin: 30px 0 38px; }
.post-inline-image-square {
  max-width: 760px;
  margin-inline: auto;
}
.post-content {
  max-width: 78ch;
  color: #343a43;
  font-size: clamp(1rem, 1.3vw, 1.06rem);
  line-height: 1.75;
}
.post-content h2 {
  margin: 34px 0 12px;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
}
.post-content h3 {
  margin: 28px 0 10px;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}
.post-content ul,
.post-content ol { margin: 0 0 1.35rem; padding-left: 1.45rem; }
.post-content li { margin: .55rem 0; }

/* About */
.about-unified { padding-block: clamp(50px, 6vw, 74px); }
.about-unified-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(34px, 4.5vw, 54px);
  align-items: start;
}
.about-unified-grid > * { min-width: 0; }
.about-unified-grid > img {
  width: 100%;
  max-height: min(72vh, 640px);
  object-fit: cover;
  object-position: center;
  border-radius: 32px;
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--header-h) + 34px);
}
.about-portfolio {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.about-portfolio h2 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}
.about-portfolio > p { color: var(--muted); }
.portfolio-subitems {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}
.portfolio-subitems li {
  position: relative;
  min-width: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.52;
}
.portfolio-subitems li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.portfolio-subitems strong { color: #252c35; }
.portfolio-subitems a:hover { color: var(--brand-dark); }
.about-original-list { grid-template-columns: 1fr; gap: 13px; }

/* Contact / forms */
.contact-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 3vw, 36px);
  align-items: start;
}
.contact-layout > * { min-width: 0; }
.contact-panel {
  min-width: 0;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 17, 20, .06);
}
.contact-panel h2 {
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 2vw, 1.55rem);
  overflow-wrap: anywhere;
}
.contact-details {
  display: grid;
  gap: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form label {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
  font-size: .92rem;
}
.form .full { grid-column: 1 / -1; }
input, textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(127, 162, 220, .28);
  outline-offset: 1px;
  border-color: var(--brand-dark);
}
.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}
.form-status {
  grid-column: 1 / -1;
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: #edf1f4;
  color: #202830;
  padding: 44px 0 34px;
  border-top: 1px solid #dbe1e6;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 46px);
  align-items: start;
}
.footer-grid > * { min-width: 0; }
.footer-logo { display: inline-block; width: clamp(148px, 15vw, 180px); }
.footer-logo img {
  width: 100%;
  height: auto;
  padding: 0;
  background: transparent;
}
.footer-tagline {
  max-width: 36ch;
  margin-top: 18px;
  color: #56616c;
}
.footer-title { margin-bottom: 10px; color: #202830; font-weight: 700; }
.footer-links {
  display: grid;
  gap: 8px;
  color: #4f5a65;
  overflow-wrap: anywhere;
}
.footer-links a { min-height: 36px; display: inline-flex; align-items: center; width: fit-content; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--brand-dark); }
.socials { display: flex; gap: 12px; margin-top: 14px; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.socials img { width: 20px; height: 20px; filter: brightness(0) saturate(100%); opacity: .72; }
.copyright {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(32,40,48,.15);
  color: #65717c;
  font-size: .92rem;
}

/* Notebook/tablet */
@media (max-width: 1023px) {
  :root { --header-h: 74px; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--container-pad) 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 26px rgba(16,17,20,.08);
  }
  .nav-menu[data-open="true"] { display: flex; }
  .nav-menu a { width: 100%; min-height: 48px; padding: 12px 0; }

  .hero-grid,
  .page-hero-grid,
  .split,
  .contact-layout,
  .about-unified-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid { gap: 34px; }
  .hero-copy { max-width: 680px; }
  .hero-media { width: min(100%, 760px); margin-inline: auto; }
  .hero-media img { max-height: 500px; }

  .cards,
  .service-grid,
  .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .page-hero img { max-height: 440px; }
  .split img { max-height: 520px; }
  .about-unified-grid > img { position: static; max-height: 520px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* Mobile */
@media (max-width: 767px) {
  :root { --header-h: 70px; --container-pad: clamp(14px, 4.5vw, 22px); }

  .logo { width: clamp(132px, 40vw, 156px); }
  .navbar { gap: 12px; }

  main > section { min-height: auto; }
  .hero-grid {
    min-height: calc(100svh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
    padding-block: clamp(34px, 7vh, 54px);
  }
  .section { padding-block: clamp(52px, 11vw, 70px); }
  .page-hero { min-height: calc(100svh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); }

  .cards,
  .service-grid,
  .cert-grid,
  .check-list,
  .form,
  .portfolio-subitems,
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }

  .blog-card { grid-template-columns: 1fr; }
  .blog-card > img { aspect-ratio: 16 / 9; min-height: 0; }

  .hero-media { padding: 0 10px 10px 0; }
  .hero-media::before { inset: 16px 0 0 24px; border-radius: 30px; }
  .hero-media img { max-height: none; border-radius: 30px; }

  .page-hero-grid { gap: 28px; }
  .page-hero img { max-height: none; border-radius: 26px; }
  .split img { max-height: none; border-radius: 24px; }

  .actions { gap: 10px; }
  .button { min-width: 0; }

  .post-content { max-width: none; }
  .post-hero-image, .post-inline-image { border-radius: 18px; }

  .form .full { grid-column: auto; }
  .contact-panel { padding: 22px; }
}

/* Small phones */
@media (max-width: 374px) {
  :root { --container-pad: 14px; }
  .nav-toggle { padding-inline: 12px; }
  .eyebrow { gap: 8px; letter-spacing: .06em; }
  .eyebrow::before { width: 24px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .button { width: 100%; }
  .contact-panel { padding: 18px; }
}

/* Large screens */
@media (min-width: 1440px) {
  :root { --max: 1180px; }
  .hero-copy { max-width: 560px; }
  .page-hero-grid { gap: 56px; }
}

@media (min-width: 1800px) {
  :root { --max: 1240px; }
  .hero-media img { max-height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
