@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("assets/fonts/inter.woff2") format("woff2");
}

:root {
    --color-bg: #fff;
    --color-text-primary: #000;
    --color-text-muted: #a9a9a9;
    --color-text-secondary: #a9a9a9;
    --color-card-bg: #f7f7f7;
    --font-family: "Inter", system-ui, -apple-system, sans-serif;
    --font-weight-medium: 500;
    --font-size-base: 15px;
    --line-height-base: 22px;
    --radius-card: 26px;
    --radius-pill: 100px;
    --content-left-padding: max(26px, calc(50% - 180px));
    --content-right-padding: 26px;
    --card-width: 420px;
    --card-image-height: 460px;
    --card-gap: 20px;
    --hero-padding-top: 226px;
    --project-padding-top: 298px;
    --hero-section-gap: 160px;
    --modal-card-height: 548px;
    --modal-content-gap: 42px;
    --modal-content-padding: 40px;
    --slider-pad-left: max(26px, calc(50vw - 180px));
    --slider-pad-right: 282px;
    --project-image-width: clamp(280px, var(--card-width), 420px);
    --project-image-height: clamp(300px, var(--card-image-height), 460px);
}

@media (max-width: 767px) {
    :root {
        --card-width: min(82vw, 300px);
        --modal-card-height: min(500px, calc(100dvh - 94px));
        --modal-content-gap: 32px;
        --modal-content-padding: clamp(24px, 6vw, 32px);
        --card-image-height: 360px;
        --card-gap: 16px;
        --content-left-padding: 26px;
        --content-right-padding: 26px;
        --hero-padding-top: 200px;
        --hero-section-gap: 200px;
        --project-padding-top: 140px;
        --slider-pad-left: 26px;
        --slider-pad-right: 26px;
        --project-image-width: calc(100vw - 52px);
        --project-image-height: 400px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    :root {
        --card-width: 360px;
        --card-image-height: 420px;
        --slider-pad-right: 26px;
    }
}

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

html {
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-base);
    background: var(--color-bg);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

body {
    min-height: 100dvh;
    margin: 0;
    padding-bottom: 125px;
    background: var(--color-bg);
    color: var(--color-text-primary);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.modal-open {
    overflow: hidden;
}

h1,
p {
    margin: 0;
}

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

img,
svg {
    display: block;
}

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

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--color-text-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    background: var(--color-text-primary);
    color: var(--color-bg);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
}

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

.site-nav {
    position: fixed;
    top: 30px;
    left: 50%;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px;
    background: rgba(242, 242, 242, 0.75);
    border: 0.5px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-pill);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.07),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.95);
    transform: translateX(-50%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 15px 20px;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    text-decoration: none;
    transition:
        background-color 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.nav-item::before {
    content: "";
    display: none;
}

.nav-item > span {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    pointer-events: none;
    background: radial-gradient(
        circle at var(--glow-x, 50%) var(--glow-y, 50%),
        rgba(255, 255, 255, 0.48) 0%,
        transparent 65%
    );
    opacity: 0;
    transition: opacity 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-item.is-hovering > span {
    opacity: 1;
}

.nav-item path,
.nav-item circle {
    fill: #a9a9a9;
    transition: fill 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.home-page .nav-portfolio,
body.modal-open .nav-about {
    background-color: rgba(255, 255, 255, 0.88);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 0.5px 0 rgb(255, 255, 255);
}

.home-page .nav-portfolio path,
body.modal-open .nav-about path,
body.modal-open .nav-about circle {
    fill: #000;
}

.intro {
    padding-top: var(--hero-padding-top);
    padding-right: var(--content-right-padding);
    padding-left: var(--content-left-padding);
}

.intro-copy {
    width: min(360px, 100%);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-base);
}

.muted {
    color: var(--color-text-muted);
}

.inline-underlined {
    color: #000;
    font-weight: 500;
    text-decoration: underline;
}

.work {
    margin-top: var(--hero-section-gap);
}

.work-track {
    display: flex;
    flex-direction: row;
    gap: var(--card-gap);
    overflow-x: auto;
    padding-right: var(--slider-pad-right);
    padding-bottom: 16px;
    padding-left: var(--slider-pad-left);
    scroll-padding-left: var(--slider-pad-left);
    scroll-behavior: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
    cursor: grab;
}

.work-item {
    flex-shrink: 0;
    width: clamp(280px, var(--card-width), 420px);
    scroll-snap-align: start;
}

.work-link {
    display: block;
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.image-frame {
    position: relative;
    width: 100%;
    height: clamp(300px, var(--card-image-height), 460px);
    overflow: hidden;
    background: var(--color-card-bg);
    border-radius: var(--radius-card);
}

.image-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent;
    transform: scale(1);
    transition: transform 0.4s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.image-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--radius-card);
    pointer-events: none;
    background: radial-gradient(
        circle at var(--glow-x, 50%) var(--glow-y, 50%),
        rgba(255, 255, 255, 0.22) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-frame.is-hovering::after {
    opacity: 1;
}

.work-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-top: 16px;
}

.work-title,
.work-kicker,
.contact-label,
.contact-link,
.contact-value {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-base);
}

.work-kicker,
.contact-link,
.contact-value {
    color: var(--color-text-secondary);
}

.contact {
    margin-top: 160px;
    padding-right: var(--content-right-padding);
    padding-bottom: 120px;
    padding-left: var(--content-left-padding);
}

.contact-group {
    margin-bottom: 52px;
}

.contact-link,
.social-links a {
    display: block;
}

.social-links {
    margin: 0;
}

.about-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(225, 225, 225, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        visibility 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
}

.about-overlay[hidden] {
    display: none;
}

.about-overlay.is-open {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.about-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(411px, 100%);
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    transition:
        opacity 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.about-overlay.is-open .about-shell {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.about-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: var(--modal-card-height);
    overflow: hidden;
    background: #fff;
    border-radius: 30px;
    box-shadow:
        0 34.5px 20.25px rgba(0, 0, 0, 0.01),
        0 15px 15px rgba(0, 0, 0, 0.01),
        0 3.75px 8.25px rgba(0, 0, 0, 0.01);
    clip-path: inset(0% round 30px);
}

.about-content {
    display: flex;
    flex: 1 1 0%;
    flex-direction: column;
    gap: var(--modal-content-gap);
    overflow-y: auto;
    padding: var(--modal-content-padding) max(20px, calc(50% - 175px));
}

.about-section {
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.about-subsection {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-text {
    margin: 0;
    font-size: clamp(14px, 3.6vw, 15px);
    font-weight: 500;
    line-height: 22px;
}

.services {
    margin-top: 0;
    border-top: 1px solid rgb(239, 239, 239);
}

.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: clamp(38px, 11vw, 46px);
    border-bottom: 1px solid rgb(239, 239, 239);
}

.about-close {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 50px;
    padding: 0;
    border: 0.5px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-pill);
    background: rgba(242, 242, 242, 0.75);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.07),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.95);
    cursor: pointer;
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
}

.about-close svg {
    transform: rotate(45deg);
}

.project-main {
    min-height: 100dvh;
}

.project-section {
    display: flex;
    justify-content: center;
    padding-right: 26px;
    padding-left: 26px;
}

.project-section:first-of-type {
    padding-top: var(--project-padding-top);
}

.project-section + .project-section {
    margin-top: 12px;
}

.project-image-frame {
    position: relative;
    width: var(--project-image-width);
    height: var(--project-image-height);
    overflow: hidden;
    background: var(--color-card-bg);
    border-radius: var(--radius-card);
}

.project-image-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent;
}

.reveal-target {
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 650ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 650ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.reveal-target.is-visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

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