html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 96px;
}

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

body {
    width: 100%;
    overflow-x: hidden;
}

img,
iframe {
    max-width: 100%;
}

h1,
h2,
h3 {
    text-wrap: balance;
}

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

#mobile-menu {
    overflow-y: auto;
    transform-origin: top center;
}

#mobile-menu nav {
    padding-block: 2rem;
}

#mobile-menu.flex {
    animation: mobile-menu-open 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#mobile-menu.flex > div,
#mobile-menu.flex nav a {
    animation: mobile-menu-item-open 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#mobile-menu.flex nav a:nth-child(1) {
    animation-delay: 55ms;
}

#mobile-menu.flex nav a:nth-child(2) {
    animation-delay: 90ms;
}

#mobile-menu.flex nav a:nth-child(3) {
    animation-delay: 125ms;
}

#mobile-menu.flex nav a:nth-child(4) {
    animation-delay: 160ms;
}

#mobile-menu.flex nav a:nth-child(5) {
    animation-delay: 195ms;
}

#mobile-menu.flex nav a:nth-child(6) {
    animation-delay: 230ms;
}

@keyframes mobile-menu-open {
    from {
        opacity: 0;
        transform: translateY(-0.75rem) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mobile-menu-item-open {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    #mobile-menu.flex,
    #mobile-menu.flex > div,
    #mobile-menu.flex nav a {
        animation-duration: 1ms;
        animation-delay: 0ms;
    }
}

main[class*="pt-32"] {
    padding-top: clamp(6.5rem, 22vw, 8rem);
}

main,
section,
header,
footer {
    max-width: 100vw;
}

.site-portrait {
    width: min(76vw, 21rem) !important;
}

.about-profile__media {
    aspect-ratio: 4 / 5;
    background: #f4efe6;
    border-radius: 1rem;
    overflow: hidden;
}

.about-profile__media img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.about-profile__copy {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 767px) {
    header {
        padding-inline: 1rem !important;
    }

    header .max-w-7xl {
        gap: 0.75rem;
    }

    header a[href="index.html"] {
        min-width: 0;
    }

    header a[href="index.html"] img {
        height: 2.75rem;
        margin-right: 0.65rem;
        flex: 0 0 auto;
    }

    header a[href="index.html"] .flex-col {
        min-width: 0;
    }

    header a[href="index.html"] span:first-child {
        font-size: clamp(0.82rem, 4vw, 0.98rem);
        line-height: 1.1;
        letter-spacing: 0.04em;
    }

    header a[href="index.html"] span:last-child {
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }

    #mobile-menu {
        padding: 1.5rem !important;
    }

    #mobile-menu nav {
        gap: clamp(1.35rem, 6vw, 2.25rem) !important;
        justify-content: center;
    }

    #mobile-menu nav a {
        font-size: clamp(1.28rem, 7vw, 1.9rem) !important;
        line-height: 1.2;
        letter-spacing: 0.08em !important;
        max-width: 100%;
    }

    main > section {
        padding-inline: 1.25rem !important;
    }

    main > section > *,
    section > *,
    .max-w-7xl,
    .max-w-6xl,
    .max-w-4xl,
    .max-w-3xl,
    .max-w-2xl,
    .max-w-xl {
        max-width: 100% !important;
        min-width: 0;
    }

    main > section.mb-32,
    section.mb-32 {
        margin-bottom: 4.5rem !important;
    }

    section.py-32 {
        padding-block: 4.5rem !important;
    }

    .site-portrait {
        width: min(82vw, 19rem) !important;
    }

    .about-profile {
        margin-bottom: 4.5rem !important;
    }

    .about-profile > div {
        align-items: center;
        display: flex !important;
        flex-direction: column;
        width: 100%;
    }

    .about-profile__media {
        aspect-ratio: 3 / 4;
        margin-inline: auto;
        max-width: min(18.5rem, calc(100vw - 4rem)) !important;
        width: min(18.5rem, calc(100vw - 4rem)) !important;
    }

    .about-profile__media img {
        object-fit: contain;
    }

    .about-profile__copy {
        align-self: stretch;
        max-width: 100%;
        width: 100%;
    }

    footer a,
    footer p,
    footer span {
        overflow-wrap: anywhere;
    }

    footer a {
        align-items: center;
        display: inline-flex;
        justify-content: center;
        min-height: 44px;
        padding-block: 0.35rem;
    }

    footer a[href^="tel:"],
    footer a[href^="mailto:"],
    footer a[href*="maps.google.com"] {
        font-size: 1rem !important;
        line-height: 1.4;
    }

    footer a[href*="wa.me"],
    footer a[href*="t.me"],
    footer a[href*="instagram.com"],
    footer a[href*="linkedin.com"] {
        min-width: 44px;
        padding: 0.55rem;
    }

    footer a[href*="wa.me"],
    footer a[href*="t.me"] {
        font-size: 1.35rem !important;
    }

    footer a[href*="instagram.com"],
    footer a[href*="linkedin.com"] {
        font-size: 1.45rem !important;
    }

    h1 {
        font-size: clamp(2rem, 8.5vw, 2.45rem) !important;
        line-height: 1.12 !important;
    }

    h2,
    h3 {
        line-height: 1.18 !important;
    }

    p,
    li {
        font-size: 1rem !important;
        line-height: 1.7 !important;
        max-width: 100%;
    }

    .accordion-content p,
    .accordion-content li {
        font-size: 1rem !important;
    }

    .accordion-open .group-hover\:pl-4,
    .group:hover .group-hover\:pl-4 {
        padding-left: 0 !important;
    }

    [class*="rounded-3xl"] {
        border-radius: 1rem !important;
    }

    [class*="grid"] {
        min-width: 0;
    }

    [class*="h-64"] {
        min-height: 9rem;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    [class*="text-6xl"] {
        font-size: 3rem !important;
    }
}

@media (max-width: 380px) {
    header a[href="index.html"] span:first-child {
        font-size: 0.78rem;
    }

    header a[href="index.html"] span:last-child {
        font-size: 0.58rem;
        letter-spacing: 0.11em;
    }

    #mobile-menu nav a {
        font-size: 1.2rem !important;
        letter-spacing: 0.06em !important;
    }
}
