:root {
  color-scheme: dark;
  --navy: #21304D;
  --navy-2: #14213A;
  --gold: #D4AF37;
  --gold-soft: #F3D987;
  --ink: #F7F4EA;
  --muted: #B9C2D3;
  --bg: #091120;
  --surface: #111C31;
  --surface-2: #17243D;
  --line: rgba(212, 175, 55, 0.22);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  color-scheme: light;
  --ink: #182239;
  --muted: #596377;
  --bg: #F8F4EA;
  --surface: #FFFFFF;
  --surface-2: #EEF2F7;
  --line: rgba(33, 48, 77, 0.14);
  --shadow: 0 22px 60px rgba(33, 48, 77, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

@media (pointer: fine) {
  body,
  a,
  button,
  input,
  textarea,
  .project-card,
  .stack-card,
  .media-zoom-trigger,
  .image-lightbox button {
    cursor: none;
  }

  .cursor-dot,
  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0);
    transition: opacity 160ms ease, width 160ms ease, height 160ms ease, border-color 160ms ease, background 160ms ease;
  }

  .cursor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.5);
  }

  .cursor-ring {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(212, 175, 55, 0.78);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.08);
  }

  body.cursor-ready .cursor-dot,
  body.cursor-ready .cursor-ring {
    opacity: 1;
  }

  body.cursor-hover .cursor-ring {
    width: 64px;
    height: 64px;
    border-color: rgba(212, 175, 55, 0.95);
    background: rgba(212, 175, 55, 0.14);
  }

  body.cursor-hover .cursor-dot {
    width: 6px;
    height: 6px;
  }

  body.cursor-press .cursor-ring {
    width: 46px;
    height: 46px;
    background: rgba(212, 175, 55, 0.22);
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.12), transparent 34%),
    linear-gradient(225deg, rgba(33, 48, 77, 0.72), transparent 42%);
  pointer-events: none;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--navy);
  color: var(--gold);
  font-size: 0.88rem;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a:hover {
  color: var(--gold);
}

.theme-toggle,
.menu-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
}

.theme-toggle {
  width: 46px;
  height: 42px;
  position: relative;
}

.sun,
.moon {
  position: absolute;
  inset: 12px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.sun {
  border: 2px solid var(--gold);
  border-radius: 50%;
}

.moon {
  border-radius: 50%;
  box-shadow: -6px 0 0 var(--gold);
  opacity: 0;
  transform: translateX(4px);
}

[data-theme="light"] .sun {
  opacity: 0;
  transform: translateX(-4px);
}

[data-theme="light"] .moon {
  opacity: 1;
  transform: translateX(0);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 40px;
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.section {
  padding: 92px 0;
}

.section-band {
  padding: 116px 0 88px;
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  background: linear-gradient(180deg, rgba(33, 48, 77, 0.14), transparent 68%);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1120px, calc(100% - 40px));
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.75), transparent);
  transform: translateX(-50%);
}

.hero-center {
  display: grid;
  justify-items: center;
  text-align: center;
  max-width: 940px;
  transform: translateY(-10px);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 0 0 24px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 850px;
  font-size: clamp(2.8rem, 5.2vw, 4.25rem);
  letter-spacing: 0;
}

.hero-center h1 {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

h1 span {
  display: block;
}

.mobile-line {
  display: none;
}

.hero-center h1 span {
  display: inline-block;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  white-space: nowrap;
}

.hero-center h1 .mobile-line {
  display: none;
}

h1 em {
  color: var(--gold);
  font-style: normal;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.55rem);
  letter-spacing: 0;
}

h3 {
  font-size: 1.16rem;
}

.hero-text,
.section-text,
.about-copy p,
.service-card p,
.project-card p,
.process-grid p {
  color: var(--muted);
}

.hero-text {
  max-width: 600px;
  margin: 24px 0 0;
  font-size: 1.13rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 32px 0 52px;
}

.hero-center .btn {
  min-width: 126px;
}

.hero-center .btn.secondary {
  border-color: var(--gold);
  color: var(--gold-soft);
}

[data-theme="light"] .hero-center .btn.secondary {
  color: var(--navy);
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.btn.primary {
  background: var(--gold);
  color: #172033;
  border-color: var(--gold);
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 150px));
  gap: 28px;
  justify-content: center;
  width: 100%;
}

.hero-stats div {
  display: grid;
  gap: 6px;
}

.hero-stats strong {
  color: var(--gold);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.portrait-frame {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: 18px;
  isolation: isolate;
}

.portrait-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(145deg, rgba(33, 48, 77, 0.96), rgba(9, 17, 32, 0.78)),
    url("assets/finance-ai-hero.png") center / cover;
}

.portrait-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 17, 32, 0.06), rgba(9, 17, 32, 0.68));
}

.portrait-photo-shell {
  width: min(82%, 380px);
  justify-self: center;
  align-self: center;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% top;
  filter: saturate(0.98) contrast(1.03);
  transition: transform 420ms ease;
  transform-origin: center 38%;
}

.portrait-frame:hover .portrait-photo {
  transform: scale(1.045);
}

.portrait-badge {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(212, 175, 55, 0.36);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(9, 17, 32, 0.78);
  color: #F7F4EA;
  backdrop-filter: blur(14px);
}

.portrait-badge span {
  color: var(--gold-soft);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portrait-badge strong {
  font-size: 1rem;
  line-height: 1.25;
}

.tech-stack {
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 84%, transparent);
}

.section-heading.compact {
  margin-bottom: 24px;
}

.section-heading.compact h2 {
  max-width: 700px;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
}

.stack-marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.stack-track {
  width: max-content;
  display: flex;
  gap: 14px;
  animation: stack-marquee 58s linear infinite;
}

.stack-marquee:hover .stack-track {
  animation-play-state: paused;
}

.stack-card {
  width: 156px;
  min-height: 116px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  text-align: center;
}

.stack-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.stack-card strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.2;
}

@keyframes stack-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 7px)); }
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.card-grid {
  display: grid;
  gap: 18px;
}

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

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card,
.project-card,
.process-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.service-card {
  min-height: 270px;
  padding: 26px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  transform-origin: center;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px) scale(1.02);
  border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.icon-box {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 34px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold);
  font-weight: 800;
}

.split-section {
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
  border-block: 1px solid var(--line);
}

.section-plain {
  position: relative;
}

.section-plain::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 92%, var(--surface) 8%);
  transform: translateX(-50%);
}

#process::before,
#contact::before {
  background: color-mix(in srgb, var(--surface-2) 66%, transparent);
}

#about::before {
  background: color-mix(in srgb, var(--bg) 88%, var(--navy) 12%);
}

.section-text {
  max-width: 600px;
  margin: 20px 0 0;
}

.featured-projects .section-heading {
  margin-bottom: 28px;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.filter-pill {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-pill.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #FFFFFF;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.14);
  transition: transform 180ms ease, opacity 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
}

.project-card.is-hidden {
  display: none;
}

.project-media {
  height: 172px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--navy);
}

.project-media img,
.project-media video {
  width: 100%;
  height: 100%;
  min-height: 172px;
  object-fit: cover;
  opacity: 0.74;
}

.media-zoom-trigger {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 172px;
  display: block;
  border: 0;
  padding: 0;
  background: #FFFFFF;
  overflow: hidden;
}

.media-zoom-trigger img {
  width: 100%;
  height: 100%;
  min-height: 172px;
  object-fit: cover;
  object-position: center;
  padding: 10px;
  background: #FFFFFF;
  opacity: 1;
  transition: transform 220ms ease;
}

.media-zoom-trigger:hover img {
  transform: scale(1.025);
}

.video-slot {
  position: relative;
}

.media-icon {
  position: absolute;
  min-width: 72px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(247, 244, 234, 0.12);
  color: var(--gold-soft);
  padding: 0 14px;
  font-size: 0.88rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.media-zoom-trigger .media-icon {
  right: 12px;
  bottom: 12px;
  background: rgba(9, 17, 32, 0.78);
  color: var(--gold-soft);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  background: rgba(5, 10, 20, 0.9);
  padding: 80px 24px 24px;
}

.image-lightbox.is-open {
  display: grid;
}

.lightbox-toolbar {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  transform: translateX(-50%);
}

.lightbox-toolbar button {
  min-height: 38px;
  border: 1px solid rgba(212, 175, 55, 0.44);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--navy);
  color: var(--gold-soft);
  font-weight: 800;
}

.lightbox-stage {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: grid;
  place-items: start center;
}

.lightbox-stage img {
  max-width: none;
  width: min(1200px, 96vw);
  height: auto;
  transform-origin: top center;
}

body.lightbox-open {
  overflow: hidden;
}

.project-body {
  padding: 20px 22px 22px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag-row span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 9px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.project-body h3 {
  margin-bottom: 10px;
}

.project-body p {
  margin: 0;
  font-size: 0.92rem;
}

.process-grid span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.process-grid article {
  min-height: 236px;
  padding: 26px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  transform-origin: center;
}

.process-grid article:hover,
.process-grid article:focus-within {
  transform: translateY(-4px) scale(1.02);
  border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.about-grid,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
}

.about-panel {
  border-left: 3px solid var(--gold);
  padding-left: 24px;
}

.about-content {
  display: grid;
  gap: 24px;
}

.about-photo {
  width: min(100%, 520px);
  justify-self: end;
}

.about-copy p:first-child {
  margin-top: 0;
}

.contact-section {
  align-items: start;
}

.contact-details {
  display: grid;
  gap: 28px;
  margin-top: 34px;
}

.contact-method {
  display: grid;
  gap: 10px;
}

.contact-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-method a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  text-decoration: none;
}

.contact-method a:hover {
  color: var(--ink);
}

.contact-method a span[aria-hidden="true"] {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
}

.contact-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.footer-grid p {
  margin: 0;
}

.footer-grid a {
  color: var(--gold);
  font-weight: 800;
}

@media (max-width: 860px) {
  .nav {
    position: relative;
    gap: 10px;
  }

  .brand {
    order: 1;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    order: 3;
    margin-left: 0;
  }

  .theme-toggle {
    display: block;
    margin-left: auto;
    flex: 0 0 auto;
    order: 2;
    margin-right: 8px;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    order: 4;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .split-grid,
  .about-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .card-grid.three,
  .card-grid.four,
  .project-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .section,
  .section-band {
    padding: 68px 0;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 150px));
  }

  .about-photo {
    justify-self: start;
  }
}

@media (min-width: 861px) and (max-width: 1180px) {
  h1 {
    font-size: clamp(2.8rem, 5vw, 4rem);
    max-width: 900px;
  }

  .portrait-frame {
    min-height: 560px;
  }

  .portrait-photo-shell {
    width: min(86%, 360px);
  }

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

@media (max-width: 560px) {
  .shell {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav {
    display: flex;
    position: relative;
    min-height: 68px;
    gap: 8px;
  }

  .brand span:last-child {
    display: none;
  }

  .brand {
    grid-column: 1;
  }

  .menu-toggle {
    display: grid !important;
    place-items: center;
    position: relative;
    top: auto;
    right: auto;
    z-index: 1;
    flex: 0 0 auto;
    margin-left: 0;
    order: 3;
    transform: none;
    border-color: var(--gold);
    background: var(--navy);
    color: var(--gold);
  }

  .theme-toggle {
    display: block;
    width: 42px;
    height: 40px;
    margin-left: auto;
    flex: 0 0 auto;
    order: 2;
    border-color: var(--gold);
    background: var(--navy);
    color: var(--gold);
  }

  .nav-links {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }

  h2 {
    font-size: clamp(1.45rem, 7vw, 1.8rem);
    line-height: 1.08;
  }

  h3 {
    font-size: 1rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-center {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    justify-self: center;
    justify-items: center;
    transform: none;
  }

  .section-heading,
  .section-text {
    max-width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .project-filters {
    justify-content: center;
  }

  .card-grid,
  .project-grid,
  .process-grid {
    justify-items: center;
  }

  .service-card,
  .project-card,
  .process-grid article,
  .about-content,
  .contact-section > div,
  .contact-form {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .about-panel,
  .about-copy {
    text-align: center;
  }

  .about-photo {
    justify-self: center;
  }

  .hero-pill {
    max-width: 100%;
    padding: 7px 14px;
    white-space: normal;
  }

  .hero-center h1 span {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  .hero-center h1 .desktop-line {
    display: none;
  }

  .hero-center h1 .mobile-line {
    display: block;
  }

  .hero-text {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.88rem;
  }

  .hero-actions {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .btn {
    width: 100%;
  }

  .hero-stats {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 4px;
  }

  .hero-stats div {
    min-width: 0;
    justify-items: center;
    text-align: center;
  }

  .hero-stats span {
    max-width: 100%;
    font-size: 0.56rem;
    line-height: 1.25;
    white-space: normal;
  }

  .portrait-frame {
    min-height: 540px;
  }

  .portrait-photo-shell {
    width: min(88%, 380px);
  }

  .portrait-badge {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 560px) and (min-width: 480px) {
  .shell,
  .hero-center {
    width: 282px;
    max-width: 282px;
    margin-left: 0;
    margin-right: auto;
    padding-left: 8px;
    padding-right: 8px;
  }
}
