:root {
  color-scheme: light;
  --navy: #131a44;
  --navy-deep: #0d1230;
  --red: #c70e0e;
  --red-hover: #d83838;
  --text: #1a1b1f;
  --hero-image: url("assets/images/hero.webp");
  --page-bg: #ffffff;
  --section-bg: #ffffff;
  --header-bg: #131a44;
  --menu-bg: #0d1230;
  --nav-text: #ffffff;
  --nav-border: rgba(255, 255, 255, 0.18);
  --toggle-track-bg: rgba(255, 255, 255, 0.08);
  --toggle-thumb-bg: #ffffff;
  --toggle-icon-color: #0d1230;
  --muted-text: rgba(26, 27, 31, 0.6);
  --soft-text: rgba(26, 27, 31, 0.78);
  --submit-bg: #1a1b1f;
  --submit-bg-hover: #32343a;
  --input-bg: #ffffff;
  --input-border: #e4e4e4;
  --input-focus: #43464d;
  --footer-bg: #ffffff;
  --card-bg: #f6f7fb;
  --card-border: rgba(19, 26, 68, 0.1);
  --card-shadow: 0 24px 60px rgba(10, 18, 35, 0.12);
  --success: #127a43;
  --error: #c70e0e;
  --accent-text: #c70e0e;
  --hero-overlay: linear-gradient(135deg, rgba(15, 15, 15, 0.9), rgba(255, 255, 255, 0) 80%);
  --gallery-overlay: linear-gradient(135deg, rgba(15, 15, 15, 0.22), rgba(255, 255, 255, 0) 75%);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --text: #eef2ff;
  --page-bg: #09101f;
  --section-bg: #09101f;
  --muted-text: rgba(228, 235, 255, 0.74);
  --soft-text: rgba(236, 240, 255, 0.86);
  --submit-bg: #2c3a5e;
  --submit-bg-hover: #3a4a72;
  --input-bg: #10182c;
  --input-border: #2a3554;
  --input-focus: #9cb2ff;
  --footer-bg: #09101f;
  --card-bg: #111b31;
  --card-border: rgba(238, 242, 255, 0.12);
  --card-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --success: #59d18d;
  --error: #ff7b7b;
  --accent-text: #ff8585;
  --hero-overlay: linear-gradient(135deg, rgba(4, 8, 18, 0.88), rgba(4, 8, 18, 0.18) 78%);
  --gallery-overlay: linear-gradient(135deg, rgba(6, 10, 21, 0.52), rgba(6, 10, 21, 0.12) 75%);
  --toggle-track-bg: rgba(255, 255, 255, 0.08);
  --toggle-thumb-bg: #ffffff;
  --toggle-icon-color: #0d1230;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background: var(--page-bg);
  font-size: 14px;
  line-height: 20px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

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

button,
input,
textarea {
  font: inherit;
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  margin: 8px;
  padding: 10px 18px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

main:focus {
  outline: none;
}

/* Visible keyboard focus on the dark header surfaces */
.brand:focus-visible,
.nav-link:focus-visible,
.cta-phone:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Visible keyboard focus on section and footer surfaces */
.content-block a:focus-visible,
.logo-row a:focus-visible,
.primary-button:focus-visible,
.footer-link:focus-visible,
.footer-theme-toggle-wrap .theme-toggle:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.site-header {
  background: var(--header-bg);
}

.nav-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 30px 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand img {
  width: 150px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-link {
  color: var(--nav-text);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-current {
  opacity: 0.8;
  color: #f1f1f1;
}

.cta-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  background: var(--red);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  line-height: 26px;
  transition: background-color 0.2s ease;
}

.cta-phone::before {
  content: "";
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20viewBox%3D%270%200%2024%2024%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20fill%3D%27%23000%27%20d%3D%27M6.62%2010.79c1.44%202.83%203.76%205.14%206.59%206.59l2.2-2.2c.27-.27.67-.36%201.02-.24%201.12.37%202.33.57%203.57.57.55%200%201%20.45%201%201V20c0%20.55-.45%201-1%201C10.61%2021%203%2013.39%203%204c0-.55.45-1%201-1h3.5c.55%200%201%20.45%201%201%200%201.24.2%202.45.57%203.57.11.35.03.74-.25%201.02l-2.2%202.2Z%27/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20viewBox%3D%270%200%2024%2024%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20fill%3D%27%23000%27%20d%3D%27M6.62%2010.79c1.44%202.83%203.76%205.14%206.59%206.59l2.2-2.2c.27-.27.67-.36%201.02-.24%201.12.37%202.33.57%203.57.57.55%200%201%20.45%201%201V20c0%20.55-.45%201-1%201C10.61%2021%203%2013.39%203%204c0-.55.45-1%201-1h3.5c.55%200%201%20.45%201%201%200%201.24.2%202.45.57%203.57.11.35.03.74-.25%201.02l-2.2%202.2Z%27/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nav-text);
  cursor: pointer;
}

.theme-toggle-track {
  position: relative;
  width: 56px;
  height: 32px;
  border: 1px solid var(--nav-border);
  border-radius: 999px;
  background: var(--toggle-track-bg);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--toggle-thumb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.theme-toggle-icon {
  color: var(--toggle-icon-color);
  font-size: 12px;
  line-height: 1;
}

:root[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(24px);
}

.cta-phone:hover {
  background: var(--red-hover);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--nav-border);
  border-radius: 0;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
}

.hero {
  color: #fff;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    var(--hero-overlay),
    var(--hero-image);
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-home {
  min-height: 400px;
  margin-bottom: 50px;
}

.hero-inner-page {
  min-height: 400px;
  margin-bottom: 50px;
}

.hero-inner-page h1 {
  text-transform: uppercase;
}

.hero-inner {
  width: 70%;
  max-width: 1140px;
  margin-bottom: 20px;
  padding: 0 24px;
}

.hero h1 {
  max-width: 760px;
  margin: 10px auto;
  font-size: 40px;
  font-weight: 700;
  line-height: 50px;
}

.hero-subtitle {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
  text-transform: uppercase;
}

.section {
  padding: 0 24px 50px;
}

.container {
  width: min(100%, 1140px);
  margin: 0 auto;
}

.content-block {
  width: 70%;
  margin: 0 auto;
  text-align: center;
}

.content-block p {
  margin: 15px 0 25px;
  color: var(--muted-text);
  line-height: 28px;
}

.content-block a {
  color: var(--text);
  font-weight: 600;
}

.privacy-content {
  max-width: 820px;
  text-align: left;
}

.privacy-content h2 {
  margin: 38px 0 12px;
  color: var(--text);
  font-size: 22px;
  line-height: 32px;
}

.privacy-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.projects-heading,
.contact-note {
  color: var(--text);
}

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-list li {
  margin-bottom: 10px;
  color: var(--soft-text);
  line-height: 28px;
}

.logo-section {
  padding: 0 24px 80px;
}

.logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.logo-row a {
  display: inline-flex;
  margin: 0;
}

.logo-row img {
  width: 300px;
  max-width: 100%;
  padding: 0;
}

.certifications-section {
  padding: 0 24px 100px;
}

.certifications-intro {
  width: min(100%, 820px);
  margin: 0 auto 48px;
  text-align: center;
}

.certifications-intro p {
  margin: 0;
  color: var(--muted-text);
  line-height: 28px;
}

.certifications-grid {
  width: min(100%, 1100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.certification-card {
  display: grid;
  grid-template-rows: 230px 1fr;
  gap: 16px;
  min-height: 440px;
  padding: 16px;
  border: 1px solid var(--card-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0)),
    var(--card-bg);
  color: var(--text);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

:root[data-theme="dark"] .certification-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    var(--card-bg);
}

.certification-card:hover {
  transform: translateY(-4px);
  border-color: rgba(199, 14, 14, 0.34);
}

.certification-card:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

.certification-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 34px;
  border: 1px solid var(--card-border);
  background: #ffffff;
}

.certification-logo-wrap img {
  width: min(100%, 250px);
  max-height: 160px;
  object-fit: contain;
}

.certification-card-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 150px;
  padding: 24px;
  border: 1px solid var(--card-border);
  background: var(--section-bg);
}

.certification-card-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.certification-card-meta {
  margin: 0;
  color: var(--muted-text);
  line-height: 24px;
}

.certification-card-reference {
  margin: 0;
  color: var(--soft-text);
  font-size: 13px;
  line-height: 22px;
}

.certification-card-action {
  margin-top: auto;
  color: var(--accent-text);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
}

.simple-title {
  margin: 0 0 24px;
  font-size: 34px;
  font-weight: 400;
  line-height: 46px;
  color: var(--text);
}

.gallery-section {
  padding: 44px 24px 90px;
}

.gallery-section-first {
  padding-top: 56px;
}

.gallery-section .container {
  width: min(100%, 1240px);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(4, 200px);
  justify-content: center;
  gap: 16px;
}

.gallery-card {
  position: relative;
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--card-bg);
  background-image: var(--gallery-card-image);
  background-position: center;
  background-size: cover;
  color: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--card-shadow);
}

.gallery-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 10, 24, 0.02) 30%, rgba(7, 10, 24, 0.9) 100%),
    linear-gradient(135deg, rgba(199, 14, 14, 0.18), rgba(7, 10, 24, 0) 42%);
  opacity: 0.88;
  transition: opacity 0.25s ease;
}

.gallery-card:hover img {
  transform: scale(1.045);
  filter: saturate(1.08) contrast(1.03);
}

.gallery-card:hover::after {
  opacity: 1;
}

.gallery-card:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

.gallery-card-content {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  gap: 2px;
}

.gallery-card-kicker {
  color: rgba(255, 255, 255, 0.76);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
}

.gallery-card-title {
  max-width: 340px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(4, 7, 18, 0.9);
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-panel {
  width: min(100%, 1120px);
  margin: 0;
}

.lightbox-panel img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #050816;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
}

.lightbox-panel figcaption {
  display: block;
  min-height: 24px;
  margin-top: 14px;
  padding: 0 80px;
  color: #fff;
  text-align: center;
  line-height: 24px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lightbox-nav span {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: var(--red);
  border-color: var(--red);
}

.lightbox-prev:hover,
.lightbox-prev:focus-visible {
  transform: translate(-3px, -50%);
}

.lightbox-next:hover,
.lightbox-next:focus-visible {
  transform: translate(3px, -50%);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--red);
  border-color: var(--red);
}

.contact-section {
  padding: 80px 24px 100px;
}

.contact-heading {
  width: min(100%, 1140px);
  margin: 0 auto 60px;
  text-align: center;
}

.contact-heading h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 400;
  line-height: 52px;
}

.contact-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4%;
  width: min(100%, 1000px);
  margin: 0 auto 60px;
}

.contact-form-wrap {
  width: 56%;
}

.contact-form {
  display: flex;
  flex-direction: column;
}

/* Spam honeypot: kept off-screen for humans, but visible to form-filling bots. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-turnstile {
  margin-bottom: 1.5rem;
}

.form-privacy-note {
  margin: 0 0 24px;
  color: var(--muted-text);
  font-size: 13px;
  line-height: 22px;
}

.form-privacy-note a {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row label {
  flex: 1;
}

.contact-form label {
  display: block;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 25px;
  padding: 21px 20px;
  border: 1px solid var(--input-border);
  outline: none;
  background: var(--input-bg);
  color: var(--text);
  border-radius: 0;
  line-height: 26px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 2px rgba(67, 70, 77, 0.08);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted-text);
}

.contact-form textarea {
  min-height: 200px;
  resize: vertical;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 12px 25px;
  border: 0;
  background: var(--submit-bg);
  color: #fff;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 20px;
  transition: background-color 0.2s ease;
}

.primary-button:hover {
  background: var(--submit-bg-hover);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.contact-form[aria-busy="true"] input,
.contact-form[aria-busy="true"] textarea {
  cursor: wait;
}

.form-note {
  margin: 18px 0 0;
  color: var(--muted-text);
  line-height: 26px;
}

.form-note.is-error {
  color: var(--error);
}

.form-note.is-success {
  color: var(--success);
}

/* No-JS form feedback: hidden until the server redirects back with a matching
   fragment (e.g. /contact/#form-sent), which reveals the banner via :target. */
.form-banner {
  display: none;
  margin: 0 0 25px;
  padding: 14px 18px;
  border: 1px solid currentColor;
  line-height: 26px;
  scroll-margin-top: 120px;
}

.form-banner:target {
  display: block;
}

.form-banner.is-error {
  color: var(--error);
}

.form-banner.is-success {
  color: var(--success);
}

.form-banner a {
  color: inherit;
}

.map-frame {
  width: 34%;
  height: 400px;
  overflow: hidden;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.site-footer {
  padding: 0 24px 60px;
  background: var(--footer-bg);
}

.footer-grid {
  width: min(100%, 1140px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.25fr 1.25fr;
  gap: 30px;
  align-items: start;
}

.footer-label {
  margin: 0;
  color: var(--text);
  opacity: 0.72;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 40px;
}

.footer-link,
.footer-text {
  margin: 0;
  color: var(--text);
  opacity: 0.74;
  font-size: 14px;
  line-height: 26px;
  transition: opacity 0.2s ease;
}

.footer-address {
  display: grid;
  gap: 2px;
  font-style: normal;
}

.footer-link:hover {
  opacity: 1;
}

.footer-copyright {
  width: min(100%, 1140px);
  margin: 56px auto 0;
  color: var(--text);
  opacity: 0.64;
  font-size: 12px;
  line-height: 20px;
}

.footer-theme-toggle-wrap {
  width: min(100%, 1140px);
  margin: 22px auto 0;
  display: flex;
  justify-content: flex-end;
}

.footer-theme-toggle-wrap .theme-toggle {
  color: var(--text);
}

.footer-theme-toggle-wrap .theme-toggle-track {
  border-color: rgba(26, 27, 31, 0.18);
  background: rgba(26, 27, 31, 0.04);
}

:root[data-theme="dark"] .footer-theme-toggle-wrap .theme-toggle-track {
  border-color: rgba(238, 242, 255, 0.22);
  background: rgba(238, 242, 255, 0.08);
}

@media (max-width: 991px) {
  .nav-shell {
    padding: 25px 30px;
    position: relative;
    flex-wrap: wrap;
  }

  .nav-enhanced .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: static;
    flex: 1 0 100%;
    width: 100%;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 0;
    background: var(--menu-bg);
  }

  .nav-enhanced .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 30px;
    right: 30px;
    width: auto;
    display: none;
  }

  .nav-enhanced .site-nav.is-open {
    display: flex;
  }

  .nav-link,
  .cta-phone {
    padding: 15px 30px;
    text-align: center;
  }

  .hero-inner,
  .content-block {
    width: 80%;
  }

  .contact-layout {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .contact-form-wrap,
  .map-frame {
    width: 80%;
  }

  .map-frame {
    margin-top: 40px;
  }

  .project-gallery {
    grid-template-columns: repeat(2, 200px);
  }

  .certifications-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 720px);
  }

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

@media (max-width: 767px) {
  .nav-shell {
    padding: 20px 30px;
  }

  .hero-home {
    min-height: 360px;
  }

  .hero-inner-page {
    min-height: 260px;
  }

  .hero-inner {
    width: 80%;
    padding: 0;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 48px;
  }

  .hero-subtitle {
    font-size: 16px;
    line-height: 28px;
  }

  .content-block {
    width: 90%;
    max-width: 470px;
    text-align: left;
  }

  .project-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .certifications-intro {
    text-align: left;
  }

  .certifications-grid {
    grid-template-columns: 1fr;
    max-width: 470px;
  }

  .contact-heading {
    margin-bottom: 50px;
  }

  .contact-form-wrap,
  .map-frame {
    width: 90%;
    max-width: 470px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-theme-toggle-wrap {
    justify-content: center;
  }

  .footer-links {
    margin-top: 10px;
    margin-bottom: 20px;
    align-items: center;
  }

  .footer-copyright {
    margin-top: 30px;
    text-align: center;
  }
}

@media (max-width: 479px) {
  .nav-shell {
    padding: 20px;
  }

  .nav-enhanced .site-nav {
    left: 20px;
    right: 20px;
  }

  .theme-toggle {
    width: 52px;
  }

  .theme-toggle-track {
    width: 52px;
  }

  .hero-inner {
    width: 100%;
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 48px;
  }

  .content-block,
  .contact-form-wrap,
  .map-frame {
    width: 100%;
    max-width: none;
  }

  .gallery-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .certifications-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .certification-card {
    grid-template-rows: 200px 1fr;
    min-height: 0;
    padding: 14px;
  }

  .certification-logo-wrap {
    min-height: 200px;
    padding: 26px;
  }

  .certification-card-copy {
    min-height: 0;
    padding: 20px;
  }

  .gallery-section-first {
    padding-top: 28px;
  }

  .gallery-card-content {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .gallery-card-title {
    font-size: 18px;
    line-height: 25px;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox-panel {
    padding-bottom: 58px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 18px;
    width: 48px;
    height: 48px;
    transform: none;
  }

  .lightbox-prev {
    left: 18px;
  }

  .lightbox-next {
    right: 18px;
  }

  .lightbox-prev:hover,
  .lightbox-prev:focus-visible,
  .lightbox-next:hover,
  .lightbox-next:focus-visible {
    transform: none;
  }

  .lightbox-panel figcaption {
    padding: 0 58px;
  }

  .contact-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .site-footer {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .gallery-card img {
    transition: none;
  }

  .skip-link {
    transition: none;
  }
}
