@media (max-width: 768px), (pointer: coarse) {
  html,
  body {
    width: 100%;
    overflow-x: clip;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
  }

  body {
    background:
      radial-gradient(circle at 18% 8%, rgba(194, 220, 233, 0.96), transparent 34%),
      radial-gradient(circle at 88% 20%, rgba(115, 171, 196, 0.58), transparent 32%),
      linear-gradient(135deg, #c2dce9 0%, #73abc4 100%);
  }

  .transition,
  .mask-transition,
  .mask-bg-overlay,
  #vanta-background {
    display: none;
  }

  .container {
    width: 100%;
    padding: 1.1rem;
  }

  h1 {
    font-size: clamp(4.8rem, 25vw, 8rem);
  }

  h2 {
    font-size: clamp(3.8rem, 18vw, 6.2rem);
  }

  h3 {
    font-size: clamp(3.45rem, 16vw, 5.8rem);
  }

  h4 {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  p,
  p.md,
  p.lg {
    font-size: 1rem;
    line-height: 1.3;
  }

  .menu {
    top: 0.85rem;
    width: calc(100% - 1.25rem);
    max-width: none;
  }

  .menu-header {
    padding: 0.78rem 1rem;
    border-radius: 12px;
  }

  .menu-logo img {
    width: 2rem;
  }

  .menu-overlay {
    transform: scaleY(0);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .menu.mobile-menu-open .menu-overlay {
    transform: scaleY(1);
  }

  .menu-nav {
    padding: 1.1rem 0 1.4rem;
  }

  .menu-nav li {
    opacity: 1;
  }

  .menu-nav a {
    font-size: clamp(2.75rem, 17vw, 4.8rem);
    padding: 0.55rem 1rem;
  }

  .menu-footer {
    opacity: 1;
    padding: 1.2rem 1rem 1.35rem;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .menu-social {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
  }

  .menu-time {
    margin-left: auto;
    white-space: nowrap;
    font-size: 0.72rem;
  }

  .menu-nav a {
    white-space: nowrap;
    font-size: clamp(2.28rem, 14.1vw, 4.1rem);
  }

  .hero {
    height: 100svh;
    min-height: 820px;
    overflow: hidden;
    background:
      radial-gradient(circle at 16% 22%, rgba(255, 252, 240, 0.4), transparent 18%),
      radial-gradient(circle at 76% 24%, rgba(20, 61, 91, 0.42), transparent 22%),
      radial-gradient(circle at 50% 52%, rgba(115, 171, 196, 0.86), transparent 28%),
      var(--base-100);
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: -8%;
    pointer-events: none;
    background:
      radial-gradient(circle at 22% 30%, rgba(20, 61, 91, 0.48), transparent 16%),
      radial-gradient(circle at 74% 34%, rgba(115, 171, 196, 0.62), transparent 18%),
      radial-gradient(circle at 46% 62%, rgba(255, 252, 240, 0.34), transparent 20%);
    filter: blur(12px);
    opacity: 1;
    animation: heroMobileFog 12s ease-in-out infinite alternate;
    will-change: transform;
    z-index: 0;
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: -5%;
    pointer-events: none;
    background:
      radial-gradient(ellipse at 18% 38%, rgba(20, 61, 91, 0.34), transparent 20%),
      radial-gradient(ellipse at 82% 44%, rgba(255, 252, 240, 0.32), transparent 20%),
      radial-gradient(ellipse at 50% 18%, rgba(115, 171, 196, 0.36), transparent 24%);
    mix-blend-mode: multiply;
    filter: blur(16px);
    opacity: 0.95;
    animation: heroMobileFog 16s ease-in-out infinite alternate-reverse;
    will-change: transform;
    z-index: 0;
  }

  .hero .container {
    height: 100%;
    padding-top: 5.5rem;
    position: relative;
    z-index: 1;
  }

  .hero .hero-content {
    height: 100%;
    justify-content: space-between;
  }

  .hero .hero-content .hero-header {
    position: absolute;
    top: 26.5%;
    left: 50%;
    width: max-content;
    padding-top: 0;
    text-align: center;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
  }

  .hero .hero-content .hero-header h1 {
    font-size: clamp(4.8rem, 24vw, 7.5rem);
    line-height: 0.72;
    white-space: nowrap;
  }

  .hero .hero-footer {
    position: absolute;
    left: 1.1rem;
    right: 1.1rem;
    bottom: max(5.25rem, calc(env(safe-area-inset-bottom) + 3.4rem));
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.85rem;
    padding-bottom: 0.25rem;
    text-align: left;
  }

  .hero .hero-footer-copy {
    display: block;
    width: 74%;
  }

  .hero .hero-footer-tags {
    width: 24%;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.25rem;
    text-align: right;
  }

  .hero .hero-footer-copy p {
    max-width: 43ch;
    margin: 0;
    font-size: clamp(0.72rem, 3.05vw, 0.88rem);
    font-weight: 760;
    line-height: 1.2;
  }

  .hero .hero-footer-tags p.mono {
    max-width: 17ch;
    font-size: clamp(0.5rem, 2.15vw, 0.66rem);
    line-height: 1.05;
  }

  .hero .hero-cards {
    position: absolute;
    top: 40.8%;
    left: 50%;
    width: min(98vw, 540px);
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    transform: translate(-50%, -50%);
    z-index: 2;
  }

  .hero .hero-cards .card,
  .home-services .cards-container .card {
    position: relative;
    flex: 1;
    aspect-ratio: 5 / 8.55;
    min-height: 0;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
  }

  .hero .hero-cards #hero-card-1 {
    z-index: 3;
  }

  .hero .hero-cards #hero-card-2 {
    z-index: 2;
  }

  .hero .hero-cards #hero-card-3 {
    z-index: 1;
  }

  .hero .hero-cards .card .hero-card-inner,
  .home-services .flip-card-front,
  .home-services .flip-card-back {
    padding: 0.64rem;
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(20, 61, 91, 0.16);
    gap: 0.22rem;
    justify-content: flex-start;
  }

  .hero .hero-cards .card .hero-card-inner {
    animation: none;
  }

  .hero .hero-cards .card .hero-card-inner > p,
  .home-services .flip-card-front .card-body p {
    font-size: clamp(0.5rem, 1.92vw, 0.62rem);
    line-height: 1.08;
    font-weight: 650;
    padding-block: 0.06rem 0;
    transform: translateY(-0.08rem);
  }

  .hero .hero-cards .card p strong,
  .home-services .flip-card-front .card-body p strong {
    font-size: clamp(0.86rem, 3.55vw, 1.16rem);
    line-height: 0.88;
    margin-bottom: 0.26rem;
  }

  .hero .hero-cards .card .card-title p.mono,
  .home-services .cards-container .card .card-title p.mono {
    font-size: clamp(0.24rem, 1vw, 0.32rem);
    letter-spacing: -0.035em;
    line-height: 0.92;
    white-space: nowrap;
  }

  .hero .hero-cards .card .card-title p.mono:first-child {
    font-size: 0;
    letter-spacing: 0;
  }

  .hero .hero-cards #hero-card-1 .card-title p.mono:first-child::after {
    content: "CLARITY LAYER";
    font-size: clamp(0.3rem, 1.18vw, 0.38rem);
    letter-spacing: -0.03em;
  }

  .hero .hero-cards #hero-card-2 .card-title p.mono:first-child::after {
    content: "TRUST LAYER";
    font-size: clamp(0.3rem, 1.18vw, 0.38rem);
    letter-spacing: -0.03em;
  }

  .hero .hero-cards #hero-card-3 .card-title p.mono:first-child::after {
    content: "DEMAND LAYER";
    font-size: clamp(0.3rem, 1.18vw, 0.38rem);
    letter-spacing: -0.03em;
  }

  .home-about {
    width: 100%;
    height: auto;
    min-height: 100svh;
    overflow: visible;
    padding: 1rem 0;
  }

  .home-about .container {
    height: auto;
    min-height: 0;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.15rem;
    border-radius: 22px;
  }

  .home-about .home-about-col:nth-child(1) .home-about-header {
    width: 100%;
  }

  .home-about .home-about-col:nth-child(2) {
    max-width: none;
    width: 100%;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
  }

  .home-about .home-about-col-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
    width: 100%;
  }

  .home-about .home-about-card {
    min-height: 14.25rem;
    aspect-ratio: auto;
    padding: 0.8rem;
    gap: 0.4rem;
    justify-content: flex-start;
  }

  .home-about .home-about-card p.mono {
    font-size: clamp(0.61rem, 2.9vw, 0.78rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
    margin-bottom: clamp(1.35rem, 6svh, 2.8rem);
  }

  .home-about .home-about-card h4 {
    font-size: clamp(1.08rem, 5.75vw, 1.72rem);
    line-height: 0.9;
    overflow-wrap: anywhere;
  }

  .home-services {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    padding: 6rem 0 3rem;
    overflow: hidden;
  }

  .home-services-header {
    top: 5.1rem;
  }

  .home-services-header p {
    font-size: clamp(2.05rem, 9vw, 3.2rem);
  }

  .home-services .cards {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
    display: flex;
    justify-content: center;
    z-index: -1;
    pointer-events: none;
  }

  .home-services .cards-container {
    position: relative;
    width: min(98vw, 540px);
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0;
    transform: none;
  }

  .home-services .cards-container .card {
    flex: 1;
    position: relative;
    aspect-ratio: 5 / 9.55;
    min-height: 0;
    max-width: none;
    margin: 0;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
  }

  .home-services .card .card-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-height: 0;
    transform: translate(-50%, -50%);
    animation: none;
    backface-visibility: hidden;
    will-change: transform;
  }

  .home-services .flip-card-inner,
  .home-services .flip-card-front,
  .home-services .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    min-height: 0;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
  }

  .home-services .flip-card-front,
  .home-services .flip-card-back {
    display: flex;
    padding: 0.64rem;
    border-radius: 12px;
  }

  .home-services .flip-card-back {
    transform: rotateY(180deg);
  }

  .home-services .flip-card-front .card-body p {
    padding-block: 0.42rem;
    font-size: clamp(0.54rem, 2.08vw, 0.68rem);
    font-weight: 650;
    line-height: 1.12;
  }

  .home-services .flip-card-front .card-body p strong {
    margin-bottom: 0.42rem;
    font-size: clamp(1rem, 4.25vw, 1.34rem);
    line-height: 0.88;
  }

  .home-services .card-title p.mono {
    font-size: clamp(0.34rem, 1.42vw, 0.44rem);
    letter-spacing: -0.06em;
    line-height: 0.92;
    white-space: nowrap;
  }

  .home-services .flip-card-front .card-title p.mono:first-child {
    font-size: 0;
    letter-spacing: 0;
  }

  .home-services #card-1 .flip-card-front .card-title p.mono:first-child::after {
    content: "CLARITY LAYER";
    font-size: clamp(0.3rem, 1.18vw, 0.38rem);
    letter-spacing: -0.03em;
  }

  .home-services #card-2 .flip-card-front .card-title p.mono:first-child::after {
    content: "TRUST LAYER";
    font-size: clamp(0.3rem, 1.18vw, 0.38rem);
    letter-spacing: -0.03em;
  }

  .home-services #card-3 .flip-card-front .card-title p.mono:first-child::after {
    content: "DEMAND LAYER";
    font-size: clamp(0.3rem, 1.18vw, 0.38rem);
    letter-spacing: -0.03em;
  }

  .hero .hero-cards .card p strong,
  .home-services .flip-card-front .card-body p strong {
    letter-spacing: -0.035em;
    text-wrap: balance;
  }

  .home-services .card-copy {
    gap: 0.28rem;
  }

  .home-services .card-copy p {
    font-size: 0.54rem;
    padding: 0.2rem 0.22rem;
    border-radius: 4px;
  }

  .home-spotlight {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    padding: 0;
    background-color: transparent;
  }

  .home-spotlight .spotlight-intro-header {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(90%, 34rem);
    transform: translate(-50%, -50%);
    z-index: 3;
  }

  .home-spotlight .spotlight-mask-header {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(82%, 30rem);
    transform: translate(-50%, -50%);
    color: var(--base-100);
    text-shadow: 0 4px 24px rgba(20, 61, 91, 0.65);
    z-index: 11;
  }

  .home-spotlight .spotlight-mask-header p {
    color: var(--base-100);
  }

  .home-spotlight .home-spotlight-images {
    position: absolute;
    top: -10svh;
    left: 42%;
    width: 180vw;
    height: 300svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0.75;
    transform: translateX(-50%) translateY(-14%);
    will-change: transform;
    z-index: 0;
  }

  .home-spotlight .home-spotlight-images-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 1rem 5vw;
    gap: 1rem;
  }

  .home-spotlight .home-spotlight-image.image-holder img {
    width: clamp(110px, 30vw, 170px);
  }

  .home-spotlight .spotlight-mask-image-container {
    display: block;
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100svh;
    overflow: hidden;
    z-index: 10;
  }

  .outro {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .outro .container {
    height: 100%;
    position: relative;
    z-index: 2;
  }

  .outro .outro-strips {
    position: absolute;
    top: 0;
    left: 50%;
    width: 260vw;
    height: 100svh;
    transform: translateX(-50%);
    opacity: 0.6;
  }

  .outro .outro-strip {
    animation: none;
    will-change: transform;
  }

  .outro .skill,
  .outro .skill p {
    white-space: nowrap;
  }

  .outro .skill p {
    font-size: clamp(0.58rem, 2.7vw, 0.78rem);
  }

  .about-hero,
  .anime-text-container,
  .about-skills,
  .about-sticky-cards,
  .contact,
  .project-header,
  .project-overview,
  .project-info,
  .project-snapshots,
  .next-project-section {
    width: 100%;
  }

  .about-hero,
  .anime-text-container,
  .contact,
  .project-header,
  .project-overview,
  .project-info,
  .next-project-section {
    overflow: visible;
  }

  .anime-text-container,
  .contact,
  .project-header,
  .project-overview,
  .project-info,
  .next-project-section {
    height: auto;
    min-height: auto;
  }

  .about-hero {
    position: relative;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    padding-top: 5.5rem;
  }

  .contact .contact-gif,
  .contact .contact-header {
    position: relative;
    inset: auto;
    transform: none;
  }

  .about-hero .about-hero-img {
    position: absolute;
    top: 5.6rem;
    left: 50%;
    width: min(78vw, 27rem);
    height: min(57svh, 34rem);
    padding: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1;
  }

  .about-hero .about-hero-img img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border-radius: 22px;
  }

  .about-hero .about-header {
    position: absolute;
    left: 50%;
    bottom: max(7.1rem, calc(env(safe-area-inset-bottom) + 4.8rem));
    width: min(102vw, 36rem);
    margin-top: 0;
    text-align: center;
    transform: translateX(-50%);
    z-index: 2;
  }

  .about-hero .about-header h2 {
    font-size: clamp(4.7rem, 22vw, 7.8rem);
    line-height: 0.8;
    color: var(--base-100);
    text-shadow: 0 10px 28px rgba(20, 61, 91, 0.84);
  }

  .anime-text-container {
    min-height: 125svh;
    padding: 4rem 0 7rem;
  }

  .anime-text-container .copy-container {
    min-height: 100svh;
    height: auto;
    align-items: flex-start;
    padding-top: 6.5rem;
    padding-bottom: 7rem;
  }

  .anime-text-container .anime-text {
    width: min(88vw, 32rem);
  }

  .anime-text-container .anime-text p {
    font-size: clamp(1.42rem, 6.8vw, 2.15rem);
    line-height: 1.22;
    margin-bottom: 1.9rem;
  }

  .about-skills,
  .about-sticky-cards,
  .project-snapshots {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .about-skills .container {
    height: 100%;
    flex-direction: column;
    gap: 1rem;
    padding-top: 5rem;
    padding-bottom: 1rem;
  }

  .about-skills .about-skills-col,
  .about-skills .about-skills-col:nth-child(1),
  .about-skills .about-skills-col:nth-child(2) {
    flex: 1;
    height: 100%;
  }

  .about-skills .object-container {
    position: absolute;
    inset: 0;
    display: block;
    min-height: 0;
    padding: 0;
  }

  .about-skills .object-container .object {
    position: absolute;
    animation: none;
  }

  .about-sticky-cards .sticky-cards-header {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, -50%);
  }

  .about-sticky-cards .gallery-card,
  .about-sticky-cards .gallery-card:nth-of-type(even) {
    position: absolute;
    top: 50%;
    left: 50%;
    width: fit-content;
    margin: 0;
    animation: none;
  }

  .about-sticky-cards .gallery-card-img,
  .about-sticky-cards .gallery-card-img img {
    width: auto;
  }

  .about-sticky-cards .gallery-card-img img {
    width: min(76vw, 460px);
  }

  .contact {
    padding-top: 5.5rem;
  }

  .contact .container {
    flex-direction: column;
    gap: 1.4rem;
  }

  .contact .contact-gif {
    order: -1;
    width: 100%;
    max-width: none;
    aspect-ratio: 5 / 3.4;
  }

  .contact-callout {
    color: var(--base-300);
    text-shadow: none;
  }

  .contact-form,
  .contact-form-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .project-header .container {
    min-height: 70svh;
    padding-top: 5.5rem;
  }

  .project-banner-img {
    aspect-ratio: 4 / 5;
    margin: 1rem 0;
  }

  .project-overview,
  .project-info {
    padding: 3rem 0;
  }

  .project-overview .container,
  .project-info .container {
    flex-direction: column;
  }

  .project-overview .project-overview-col:nth-child(1),
  .project-info .project-info-col:nth-child(1) {
    display: none;
  }

  .project-overview .project-overview-col:nth-child(2),
  .project-overview .project-overview-col:nth-child(2) .project-overview-copy,
  .project-info .project-info-col:nth-child(2) .project-info-copy {
    width: 100%;
    gap: 3rem;
  }

  .project-overview-copy.card {
    padding: 1.25rem;
  }

  .project-snapshots-wrapper {
    position: relative;
    width: max-content;
    height: 100svh;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(8rem, 42vw, 16rem);
    padding: 0 14vw;
  }

  .project-snapshot {
    flex: none;
    width: auto;
    height: 62%;
  }

  .project-snapshot img {
    width: auto;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .snapshots-progress-bar {
    display: flex;
    bottom: 2rem;
    width: calc(100% - 4rem);
  }

  .next-project-section {
    min-height: 70svh;
    padding: 5rem 1.15rem;
  }

  footer {
    width: 100%;
    border-radius: 28px 28px 0 0;
    padding-top: 1.35rem;
    padding-bottom: 0.25rem;
    background:
      linear-gradient(135deg, rgba(20, 61, 91, 0.96), rgba(20, 61, 91, 0.88)),
      radial-gradient(circle at 18% 16%, rgba(194, 220, 233, 0.18), transparent 28%);
    border-top: 1px solid rgba(194, 220, 233, 0.28);
    box-shadow: 0 -18px 60px rgba(20, 61, 91, 0.18);
  }

  footer .footer-top {
    padding-bottom: 0.1rem;
  }

  footer .container {
    gap: 0.65rem;
  }

  footer .footer-email-row {
    padding: 0.25rem 0;
  }

  footer .footer-microcopy {
    max-width: 36ch;
  }

  footer .footer-bottom .footer-col:nth-child(1) {
    display: block;
  }

  footer .footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
    align-items: stretch;
    padding: 1.05rem 0 0.25rem;
  }

  footer .footer-logo {
    width: 2.18rem;
    margin-top: 0;
  }

  footer .footer-bottom .footer-col:nth-child(2) {
    margin-left: auto;
    align-self: flex-end;
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: end;
    column-gap: clamp(1.35rem, 6vw, 2.25rem);
    row-gap: 0;
    padding-top: 0;
    width: max-content;
    max-width: 100%;
  }

  footer .footer-bottom .footer-col:nth-child(2) .footer-sub-col:first-child {
    display: none;
  }

  footer .footer-bottom .footer-sub-col p.mono {
    font-size: clamp(0.58rem, 2.6vw, 0.74rem);
    white-space: nowrap;
    margin-bottom: 0.48rem;
  }

  footer .footer-links,
  footer .footer-copy {
    gap: 0.3rem;
  }

  footer .footer-links p,
  footer .footer-copy p,
  footer .footer-links a,
  footer .footer-copy a {
    font-size: clamp(0.66rem, 2.9vw, 0.8rem);
    line-height: 1.18;
    white-space: nowrap;
  }

  footer .footer-copyright {
    padding-top: 0;
  }
}

@keyframes heroMobileFog {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 1.5%, 0) scale(1.04);
  }
}
