@font-face {
    font-family: Manrope;
    src: url("assets/fonts/manrope-latin.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

body { background: #fff; color: #162236; font-family: Manrope, system-ui, sans-serif; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #185ea7; outline-offset: 4px; }
main { scroll-margin-top: 5rem; }
.portfolio-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid #dce6ef; }
.portfolio-nav { width: min(1160px, calc(100% - 3rem)); min-height: 72px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem 2rem; }
.portfolio-name { white-space: nowrap; text-decoration: none; font-size: 1.2rem; font-weight: 800; }
.portfolio-name span { color: #185ea7; }
.portfolio-header .portfolio-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .25rem clamp(.65rem, 2vw, 1.5rem); margin: 0; width: auto; min-height: 0; }
.portfolio-links a, .portfolio-menu { color: #344b65; text-decoration: none; font-size: .925rem; font-weight: 750; }
.portfolio-links a { padding-block: .5rem; }
.portfolio-links a:hover, .portfolio-links [aria-current] { color: #185ea7; text-decoration: underline; text-underline-offset: .35em; }
.portfolio-menu, .project-finder button { padding: .5rem .75rem; border: 1px solid #c9dceb; background: #f4faff; border-radius: 6px; cursor: pointer; }
.skip-link { position: absolute; top: .5rem; left: 1rem; padding: .5rem 1rem; background: white; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.page-hero { padding-block: clamp(3rem, 8vw, 6.5rem); }
.page-hero h1 { color: #162236; letter-spacing: -.045em; }
.page-hero .section-label, .section-label, .text-link { color: #185ea7; }
.project-card, .project-card.featured-project { border-color: #dce6ef; background: #fff; }
.project-card.featured-project { border-top: 3px solid #83b9e8; }
.project-finder { width: min(1180px, calc(100% - 3rem)); margin: 0 auto 1.5rem; padding: 1rem 1.2rem; background: #f4faff; border: 1px solid #dce6ef; border-radius: 10px; }
.project-finder label { display: block; margin-bottom: .35rem; font-weight: 750; }
.project-finder div { display: flex; flex-wrap: wrap; gap: .5rem; }
.project-finder input { width: min(100%, 30rem); min-height: 44px; padding: .55rem .7rem; font: inherit; color: inherit; background: #fff; border: 1px solid #9cb7ce; border-radius: 6px; }
.project-finder p { margin: .35rem 0 0; font-size: .875rem; }
.portfolio-lightbox { max-width: min(94vw, 1440px); max-height: 92vh; padding: 1rem; border: 1px solid #dce6ef; border-radius: 10px; }
.portfolio-lightbox::backdrop { background: rgb(15 30 49 / .75); }
.portfolio-lightbox img { display: block; width: auto; max-width: 100%; max-height: 77vh; margin-top: .6rem; }
.portfolio-lightbox button { min-height: 44px; padding: .5rem 1rem; font: inherit; cursor: pointer; }

@media (max-width: 820px) {
    .portfolio-nav { flex-wrap: wrap; min-height: 64px; padding-block: .7rem; }
    .portfolio-header .portfolio-links { padding-block: .35rem; width: 100%; justify-content: flex-start; }
    .portfolio-links a { padding-block: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.page-hero {
    width: 100%;
    padding-inline: max(1.5rem, calc((100% - 1080px) / 2));
    padding-block: clamp(3.25rem, 8vw, 6.5rem);
    color: #f3f8ff;
    background:
        radial-gradient(ellipse at 82% 16%, #284c79 0%, transparent 54%),
        linear-gradient(150deg, #1b2c50, #111e36 72%);
}
.page-hero h1 { color: #f3f8ff; font-size: clamp(2.4rem, 5.6vw, 4.25rem); overflow-wrap: break-word; }
.page-hero .section-label { color: #9fdbff; }
.page-hero p:not(.section-label) { color: #cfddf0; }
.page-hero > :last-child { margin-bottom: 0; }
.page-hero > * { animation: page-intro .5s ease-out both; }
.page-hero h1 { animation-delay: .04s; }
.page-hero p:not(.section-label) { animation-delay: .08s; }
.page-hero + .project-finder { margin-top: 1.5rem; }

main > :is(.featured, .about-layout, .contact-layout) { --panel-blue: #f4f9ff; }
main > .featured { background: var(--panel-blue); border-color: #d6e5f3; }
:is(.about-card, .contact-card, .case-card, .focus-card) { border-color: #d6e5f3; }
:is(.project-card, .about-card, .contact-card, .case-card) :is(h2, h3) { color: #1a3659; }
.project-status, .project-tags span { color: #234e7c; }
.project-tags span { background: #edf6ff; border-color: #d6e5f3; }
.project-card:focus-within, .project-card:hover { border-color: #82add4; box-shadow: 0 12px 26px #18345515; }

.portfolio-lightbox[open] { animation: page-intro .24s ease-out both; }
.portfolio-lightbox[open]::backdrop { animation: shade-in .24s ease-out both; }
.reading-progress {
    position: absolute;
    inset: auto 0 -2px;
    height: 3px;
    background: #3682c4;
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}
.arrived { animation: content-arrival .42s ease-out both; }

@keyframes page-intro {
    from { opacity: .2; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes content-arrival {
    from { opacity: .72; translate: 0 7px; }
    to { opacity: 1; translate: 0 0; }
}
@keyframes shade-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .page-hero > *, .portfolio-lightbox[open], .portfolio-lightbox[open]::backdrop, .arrived { animation: none; }
    .project-card:hover { transform: none; }
}
