:root {
  color-scheme: dark;
  --color-bg: #1b1b1b;
  --color-paper: #222222;
  --color-surface: #292929;
  --color-text: #ecece8;
  --color-muted: #b6b6b0;
  --color-border: #4b4b4b;
  --color-border-strong: #858585;
  --color-hover: #d7d7d2;
  --color-active: #c6c6c0;
  --color-surface-hover: #353535;
  --font-main: Arial, sans-serif;
  --container: 80rem;
  --gutter: 1rem;
  --page-padding: 1.25rem;
  --header-height: 4rem;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --radius: .25rem;
  --radius-button: 1rem;
  --fast: 160ms;
  --normal: 240ms;
  --slow: 400ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1.5rem); scrollbar-gutter: stable; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font: 1rem/1.5 var(--font-main); }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 500; overflow-wrap: anywhere; }
h2 { font-size: clamp(2rem, 1.75rem + 1vw, 2.25rem); line-height: 1.1; letter-spacing: -.025em; }
h3 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border-radius: var(--radius-button); }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-text); outline-offset: 4px; box-shadow: 0 0 0 2px var(--color-bg); }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--color-text); color: var(--color-bg); }
.container { width: min(var(--container), calc(100% - var(--page-padding) * 2)); margin-inline: auto; }
.container > *, .project-card > *, .contact__inner > * { min-width: 0; }
.skip-link { position: fixed; left: 1rem; top: 1rem; z-index: 60; padding: .75rem 1rem; background: var(--color-text); color: var(--color-bg); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.eyebrow, .project__meta { font-size: .875rem; line-height: 1.45; }
.eyebrow { font-weight: 500; letter-spacing: .01em; }
.header { position: sticky; top: 0; z-index: 30; background: var(--color-bg); border-bottom: 1px solid transparent; transition: border-color var(--fast); }
.header.is-scrolled { border-color: var(--color-border); }
.header:not(.is-enhanced) { position: static; }
.header__inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .25rem 1rem; }
.navigation { display: flex; width: 100%; gap: 1.5rem; padding-bottom: .5rem; }
.navigation__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: transparent; font-size: .875rem; text-align: left; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.navigation__link[aria-current="location"] { text-decoration-line: underline; }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .5rem; border: 0; background: transparent; font-size: .875rem; }
.menu-toggle__icon { display: grid; width: 20px; gap: 5px; }
.menu-toggle__icon span { height: 1px; background: currentColor; transition: transform var(--normal); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:last-child { transform: translateY(-3px) rotate(-45deg); }
.header.is-enhanced .navigation { position: absolute; top: 100%; left: 0; width: 100%; padding: 1rem var(--page-padding); display: grid; gap: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.header.is-enhanced .navigation__link { min-height: 56px; font-size: 1rem; }
.header.is-open .navigation { animation: menu-in 220ms var(--ease-standard) both; }
.hero { display: grid; gap: 2.5rem; padding-block: 2rem 3rem; }
.hero__greeting { margin-bottom: .75rem; font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem); line-height: 1.2; }
.hero__title { font-size: clamp(2.5rem, -.41rem + 14.55vw, 3rem); line-height: 1.05; letter-spacing: -.035em; }
.hero__surname { display: block; }
.hero__description { max-width: 30rem; margin-top: 1.5rem; font-size: 1.125rem; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__actions { flex-direction: column; align-items: stretch; gap: .375rem; margin-top: 1.5rem; }
.hero__download { align-self: flex-start; }
.hero__download svg { flex: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.25rem; border: 0; border-radius: var(--radius-button); font-size: 1rem; line-height: 1.5; font-weight: 500; transition: background var(--fast), color var(--fast); text-align: center; }
.hero__actions .button { width: 100%; }
.button--primary { background: var(--color-text); color: var(--color-bg); }
.button--secondary { border: 1px solid var(--color-border-strong); padding: calc(.75rem - 1px) calc(1.25rem - 1px); }
.button--light { background: var(--color-text); color: var(--color-bg); }
.arrow { display: inline-block; flex-shrink: 0; transition: transform var(--fast) var(--ease-out); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.tags li { padding: .375rem .75rem; border-radius: var(--radius); background: var(--color-surface); font-size: .875rem; overflow-wrap: anywhere; }
/* Прозрачный бейдж: точка подвеса — верх карабина. */
.hero__badge { width: min(16rem, calc(100% - 3rem)); aspect-ratio: 564 / 1062; align-self: start; margin: 0 auto; }
.hero__badge-trigger { display: block; width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; touch-action: manipulation; }
.hero__badge-image { width: 100%; height: auto; transform-origin: 50% 3%; filter: drop-shadow(0 12px 12px #00000012); }
.hero__badge.is-waiting .hero__badge-drop { visibility: hidden; }
.hero__badge.is-entering .hero__badge-drop { animation: badge-drop 1400ms cubic-bezier(.16, 1, .3, 1) both; }
.hero__badge.is-entering .hero__badge-image { animation: badge-sway 5000ms 1000ms ease-in-out both; }
@keyframes badge-drop {
  0% { transform: translateY(calc(-100vh - 100%)); }
  100% { transform: translateY(0); }
}
@keyframes badge-sway {
  0% { transform: rotate(0); }
  18% { transform: rotate(-1.8deg); }
  38% { transform: rotate(1.2deg); }
  60% { transform: rotate(-.65deg); }
  80% { transform: rotate(.25deg); }
  100% { transform: rotate(0); }
}
.media { position: relative; isolation: isolate; overflow: hidden; background: var(--color-surface); }
.media img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform 320ms var(--ease-out); }
.media img.media__image--contain { object-fit: contain; background: var(--color-bg); }
.media.is-unavailable img { opacity: 0; }
.media.is-loaded .media__fallback { visibility: hidden; }
.media__fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; color: var(--color-muted); font-size: .875rem; }
.section { border-top: 1px solid var(--color-border); }
.section-heading { display: flex; align-items: flex-start; gap: 1rem; }
.about { display: grid; gap: 2rem; padding-block: 3rem 4rem; }
.about__body { display: grid; gap: 2rem; align-items: start; }
.about__body > * { min-width: 0; }
.about__visual { width: min(100%, 22rem); }
.about__photo img { width: 100%; height: auto; }
.about__photo photo-stack { display: block; width: 100%; --photo-stack-width: 100%; --photo-stack-focus: var(--color-text); }
.about__photo photo-stack:not(:defined) > img:not(:first-child) { display: none; }
.about__photo-hint { margin-top: 1.125rem; min-height: 2.5em; color: var(--color-muted); font-size: .75rem; line-height: 1.5; text-align: center; }
.about__tags { margin-top: 1rem; }
.about__description { max-width: 41.25rem; }
.facts { margin-top: 2rem; }
.facts__row { display: grid; gap: .5rem; padding-block: 1rem; border-bottom: 1px solid var(--color-border); }
.facts__row:last-child { border-bottom: 0; }
.facts dt, .field-label { color: var(--color-muted); font-size: .875rem; line-height: 1.5; }
.facts dd { overflow-wrap: anywhere; }
.portfolio { padding-block: 3rem 4rem; }
.project__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; color: var(--color-muted); }
.field-label { display: block; margin-bottom: .5rem; }
.text-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; max-width: 100%; padding-block: .625rem; font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.text-link[href] { text-decoration-line: underline; }
.text-link[href]:visited { color: var(--color-muted); }
a[aria-disabled="true"] { cursor: default; }
.contact { padding-block: 3.5rem; border-top: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text); }
.contact__inner { display: grid; gap: 2rem; align-items: center; }
.contact__content { display: grid; gap: 1.5rem; min-width: 0; }
.contact__picture { width: min(8rem, 100%); justify-self: start; margin: .5rem 0; }
.contact__picture img { width: 100%; height: auto; border-radius: .25rem; }
.contact__links { display: grid; gap: 1rem; min-width: 0; }
.contact__item { min-width: 0; }
.contact .field-label { margin-bottom: 0; color: var(--color-muted); }
.contact__item .text-link { display: flex; width: fit-content; align-items: flex-start; padding-top: 0; }
.contact .text-link[href]:visited, .footer .text-link[href]:visited { color: inherit; }
.footer { background: var(--color-bg); color: var(--color-text); }
.footer__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding-block: 1.5rem; border-top: 1px solid var(--color-border); font-size: .875rem; }
.footer__inner p { color: var(--color-muted); }
.footer__credits { display: grid; gap: .25rem; }
.footer__credit { font-size: .8125rem; }
.footer .text-link[href] { text-decoration: none; }
.is-reveal-ready { transition: opacity var(--normal) var(--ease-standard), transform var(--slow) var(--ease-out); }
.is-reveal-ready:not(.is-visible) { opacity: .72; }
[data-reveal="image"].is-reveal-ready:not(.is-visible) { opacity: .85; }
.hero__title { animation: hero-text 480ms var(--ease-out) both; }
.hero__description { animation: hero-opacity 320ms 60ms var(--ease-out) both; }
.hero__actions { animation: hero-opacity 240ms 80ms var(--ease-out) both; }
.hero__tags { animation: hero-opacity 240ms 120ms var(--ease-out) both; }
@keyframes hero-text { from { opacity: .7; } to { opacity: 1; } }
@keyframes hero-opacity { from { opacity: .75; } to { opacity: 1; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (hover: hover) and (pointer: fine) {
  .navigation__link:hover { text-decoration: underline; text-underline-offset: 6px; }
  .button--primary:hover, .button--light:hover { background: var(--color-hover); }
  .button--secondary:hover { background: var(--color-surface-hover); }
  .text-link[href]:hover { text-decoration-thickness: 2px; }
  .text-link[href]:hover .arrow { transform: translateX(3px); }
  .menu-toggle:hover { color: var(--color-muted); }
}
.button--primary:active, .button--light:active { background: var(--color-active); }
.button--secondary:active { background: var(--color-border); }
.text-link[href]:active .arrow { transform: none; }

@media (max-width: 374px) { :root { --page-padding: 1rem; } }
@media (min-width: 480px) {
  .hero__title { font-size: clamp(3rem, 1.78rem + 4.65vw, 4rem); }
  .hero__actions { width: min(100%, 17.5rem); }
}
@media (min-width: 768px) {
  :root { --page-padding: 2rem; --gutter: 1.5rem; --header-height: 4.5rem; }
  body { font-size: 1.0625rem; line-height: 1.53; }
  h2 { font-size: clamp(2.5rem, 1rem + 3.125vw, 3rem); }
  h3 { font-size: 1.75rem; }
  .header__inner { flex-wrap: nowrap; }
  .header .navigation, .header.is-enhanced .navigation { position: static; display: flex; width: auto; gap: 1.5rem; padding: 0; border: 0; animation: none; }
  .header.is-enhanced .navigation__link { min-height: 44px; font-size: .875rem; }
  .hero { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--gutter); align-items: center; padding-block: 3rem 4rem; min-height: 38rem; }
  .hero__content { grid-column: 1 / 6; grid-row: 1; }
  .hero__badge { grid-column: 6 / 9; grid-row: 1; position: relative; top: -3rem; width: min(17rem, calc(100% - 1.5rem)); }
  .hero__title { font-size: clamp(2rem, 4vw, 3.5rem); white-space: nowrap; }
  .hero__surname { display: inline; }
  .hero__description { font-size: 1.25rem; }
  .button { min-height: 52px; padding: .875rem 1.5rem; }
  .button--secondary { padding: calc(.875rem - 1px) calc(1.5rem - 1px); }
  .facts__row { grid-template-columns: 8.75rem minmax(0, 1fr); gap: 1.5rem; }
  .about { padding-block: 4rem 5rem; }
  .about__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
  .portfolio { padding-block: 4rem 5rem; }
  .contact { padding-block: 4rem; }
  .contact__inner { grid-template-columns: minmax(0, 1fr) 12rem; gap: 2rem; }
  .contact__content { gap: 2rem; }
  .contact__links { grid-template-columns: repeat(3, max-content); justify-content: start; gap: 1.5rem; align-items: start; }
  .contact__picture { width: min(10rem, calc(100% - 2rem)); justify-self: center; margin: 1rem; }
  .footer__inner { flex-direction: row; align-items: center; justify-content: space-between; padding-block: 1.25rem; }
  [data-reveal="heading"].is-reveal-ready:not(.is-visible) { transform: translateY(12px); }
  @keyframes hero-text { from { opacity: .7; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
@media (min-width: 1025px) {
  :root { --page-padding: 3rem; --header-height: 5rem; }
  body { font-size: 1.125rem; line-height: 1.56; }
  h2 { font-size: clamp(3rem, 1.765rem + 1.93vw, 3.5rem); }
  h3 { font-size: clamp(1.75rem, 1.132rem + .966vw, 2rem); }
  .hero { grid-template-columns: repeat(12, minmax(0, 1fr)); padding-block: 4rem 5rem; min-height: 42.5rem; }
  .hero__content { grid-column: 1 / 8; }
  .hero__badge { grid-column: 9 / 13; top: -4rem; width: min(20rem, calc(100% - 2rem)); }
  .hero__title { line-height: 1.05; }
  .hero__description { font-size: 1.5rem; }
  .hero__actions { margin-top: 2rem; }
  .facts__row { grid-template-columns: 10rem minmax(0, 1fr); }
  .about { padding-block: 5rem 6rem; }
  .about__body { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); }
  .portfolio { padding-block: 5rem 6rem; }
  .contact { padding-block: 6rem; }
  .contact__inner { gap: clamp(3rem, 6vw, 6rem); }
  .footer__inner { padding-block: 1.5rem; }
}
@media (min-width: 1440px) { :root { --page-padding: 5rem; } }
@media (max-width: 767px) { .hero { padding-top: .5rem; } .is-reveal-ready { transition-duration: 240ms; } .hero__title { animation-duration: 240ms; } }
@media (prefers-reduced-motion: reduce) {
  .text-link[href]:hover .arrow { transform: none; }
  html { scroll-behavior: auto; }
  .hero__badge.is-waiting .hero__badge-drop { visibility: visible; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .is-reveal-ready:not(.is-visible), [data-reveal="image"].is-reveal-ready:not(.is-visible) { opacity: 1; transform: none; }
}

/* Карточки проектов и подробный кейс */
.projects { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 2rem; margin-top: 2rem; align-items: stretch; }
.project-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: .75rem; border: 1px solid var(--color-border); border-radius: 1.5rem; background: var(--color-paper); transition: border-color var(--fast); }
.project-card__preview { flex: none; width: 100%; border-radius: 1rem; }
.project-card__preview img { position: relative; height: auto; }
.project-card__info { display: flex; flex: 1; flex-direction: column; padding: 1.25rem .5rem .5rem; }
.project-card .project__meta { display: block; font-size: 1rem; margin: .75rem 0 0; }
.project-card h3, .project-card__title { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); line-height: 1.2; }
.project-card__heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; }
.project-card__heading h3 { flex: 1 1 auto; min-width: 0; }
.project-card__title { display: flex; align-items: flex-start; justify-content: flex-start; gap: .625rem; min-width: 0; max-width: 100%; }
.project-card__title h3 { flex: 0 1 auto; }
.project-card__logo { flex: none; width: 20px; height: 20px; margin-top: calc(.6em - 10px); object-fit: contain; border-radius: .25rem; }
.project-card__year { margin-top: .625rem; color: var(--color-muted); font-size: .875rem; line-height: 1.4; }
.project-card__status { flex: none; display: inline-flex; align-items: center; gap: .375rem; padding: .375rem .625rem; border-radius: .5rem; font-size: .75rem; line-height: 1.4; white-space: nowrap; }
.project-card__status svg { flex: none; }
.project-card__status--ready { background: #dff1a0; color: #191919; }
.project-card__status--pending { background: #d69065; color: #191919; }
.project-card__summary { display: flex; flex-direction: column; cursor: pointer; list-style: none; }
.project-card:not(.is-interactive) > .project-case { height: 100%; }
.project-case:not([open]) > .project-card__summary { height: 100%; }
.project-card__summary::-webkit-details-marker { display: none; }
.project-card__summary::marker { content: ""; }
.project-card__title-button { display: block; padding: 0; border: 0; background: transparent; font: inherit; letter-spacing: inherit; text-align: left; }
.project-card__title-button::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: 1.5rem; }
.project-card:has(.project-card__title-button:focus-visible), .project-card:has(.project-card__summary:focus-visible) { outline: 2px solid var(--color-text); outline-offset: 4px; }
.project-card__title-button:focus-visible, .project-card__summary:focus-visible { outline: none; box-shadow: none; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: auto 0 0; padding: 1rem 0 0; list-style: none; }
.project-card__tags li { padding: .375rem .75rem; border: 1px solid var(--color-border-strong); border-radius: 999px; background: var(--color-bg); color: var(--color-text); font-size: .8125rem; line-height: 1.4; }
.project-case__content { overflow-wrap: anywhere; }
.project-case[open] > .project-case__content { padding: 1.5rem .5rem; border-top: 1px solid var(--color-border); }
.case-overview { display: grid; gap: 1.25rem; }
.case-overview > div { display: grid; gap: .375rem; }
.case-overview dt { color: var(--color-muted); font-size: .875rem; }
.case-overview dd { min-width: 0; max-width: 44rem; font-size: 1rem; line-height: 1.6; }
.case-website { padding-block: 0; min-height: 32px; }
.project-case__description { font: inherit; }
.case-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.case-tags li { padding: .25rem .625rem; border: 1px solid var(--color-border); border-radius: .5rem; background: var(--color-surface); font-size: .875rem; line-height: 1.4; }
.project-case__cover { margin-top: 2.5rem; }
.project-case__cover:empty { display: none; }
.case-section { margin-top: 2.5rem; }
.case-section h3 { margin-bottom: 1rem; font-size: clamp(1.5rem, 1rem + 1.5vw, 2rem); line-height: 1.2; }
.case-section > p { max-width: 44rem; font-size: 1.0625rem; line-height: 1.65; }
.case-section--result { padding-top: 2rem; border-top: 1px solid var(--color-border); }
.case-gallery { display: grid; gap: 1.5rem; margin-top: 2rem; }
.case-gallery.case-gallery--stacked { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.case-image-link { display: block; border-radius: 1rem; }
.case-image { width: 100%; height: auto; border-radius: 1rem; }
.case-figure { min-width: 0; }
.case-figure--wide { margin-top: 1.5rem; }
.case-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; width: 100%; aspect-ratio: 4 / 3; padding: 1.25rem; border: 1px dashed var(--color-border); border-radius: .75rem; background: var(--color-surface); color: var(--color-muted); text-align: center; font-size: .875rem; }
.case-placeholder svg { flex: none; opacity: .7; }
.case-figure figcaption { margin-top: .75rem; color: var(--color-muted); font-size: .875rem; line-height: 1.5; }
.project-dialog { width: min(64rem, calc(100% - 4rem)); max-width: none; max-height: calc(100vh - 4rem); max-height: calc(100dvh - 4rem); margin: auto; padding: 0; border: 1px solid var(--color-border); border-radius: 1.5rem; background: var(--color-bg); color: var(--color-text); overscroll-behavior: contain; overflow-y: auto; }
.project-dialog:not([open]) { display: none; }
.project-dialog::backdrop { background: rgb(0 0 0 / 72%); }
.project-dialog[open] { animation: case-in 240ms var(--ease-out); }
.project-dialog__bar { display: flex; align-items: center; justify-content: flex-end; position: sticky; top: 0; z-index: 2; padding: .75rem 1.5rem; background: var(--color-bg); }
.project-dialog__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; border: 0; padding: .5rem; background: transparent; }
.project-dialog__close span { font-size: 1.75rem; line-height: 1; }
.project-dialog__body { padding: 1.5rem clamp(2rem, 6vw, 4.5rem) 4.5rem; }
.project-dialog h2 { max-width: 48rem; margin-bottom: 2.5rem; font-size: clamp(2rem, 1rem + 3vw, 3.5rem); line-height: 1.1; }
.project-dialog h2.has-logo { display: flex; align-items: flex-start; justify-content: flex-start; gap: .75rem; }
.project-dialog__logo { flex: none; width: 24px; height: 24px; margin-top: calc(.55em - 12px); object-fit: contain; border-radius: .25rem; }
.project-card__logo[data-logo-shape="symbol"], .project-dialog__logo[data-logo-shape="symbol"] { border-radius: 0; }
.project-dialog__preview { aspect-ratio: 1280 / 832; border: 1px solid var(--color-border); border-radius: 1rem; }
.project-dialog__preview img { object-fit: contain; }
body.is-modal-open { position: fixed; top: var(--modal-scroll-offset); inset-inline: 0; width: 100%; overflow: hidden; }
@keyframes case-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (min-width: 768px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 1.5rem; margin-top: 3rem; }
  .project-card { padding: 1rem; }
  .project-card__preview { aspect-ratio: 1280 / 832; }
  .project-card__preview img { position: absolute; height: 100%; }
  .project-card__info { padding: 1.5rem .5rem .5rem; }
  .case-overview > div { grid-template-columns: 8rem minmax(0, 1fr); gap: 1.5rem; }
  .case-section { margin-top: 3.5rem; }
  .case-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-gallery--mobile .case-placeholder { aspect-ratio: 3 / 4; }
  .case-figure--wide .case-placeholder { aspect-ratio: 16 / 9; }
}
@media (max-width: 767px) {
  .project-card h3, .project-card__title { font-size: 1.25rem; line-height: 1.25; }
  .project-card__logo { width: 16px; height: 16px; margin-top: calc(.625em - 8px); }
  .header.is-enhanced .navigation__link { justify-content: center; text-align: center; }
  .project-dialog { inset: 0; width: 100%; height: 100vh; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .project-dialog__bar { padding: max(.75rem, env(safe-area-inset-top)) var(--page-padding) .75rem; }
  .project-dialog__body { padding: 1.5rem var(--page-padding) max(2rem, env(safe-area-inset-bottom)); }
  .project-dialog[open] { animation-name: hero-opacity; }
}
@media (hover: hover) and (pointer: fine) {
  .project-card.is-interactive:hover { border-color: var(--color-border-strong); }
  .project-card.is-interactive:hover .project-card__preview.is-loaded img { transform: scale(1.015); }
  .project-dialog__close:hover { background: var(--color-surface); }
}
@media (prefers-reduced-motion: reduce) {
  .project-card.is-interactive:hover .project-card__preview.is-loaded img { transform: none; }
}


/* Cursor label for desktop mouse interactions. */
.interaction-cursor {
  position: fixed;
  z-index: 2147483647;
  width: max-content;
  max-width: calc(100vw - 16px);
  padding: .625rem 1.125rem;
  border: 2px solid #078d49;
  border-radius: 4px 999px 999px 999px;
  background: #10ae5c;
  color: #fff;
  box-shadow: 0 6px 16px rgb(0 0 0 / 18%);
  font: 400 1rem/1.25 Arial, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 100ms ease;
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .interaction-cursor.is-visible { visibility: visible; opacity: 1; }
  :root {
    --interactive-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='36' viewBox='0 0 32 36'%3E%3Cpath d='M4 3L27 13L16 17L12 29Z' fill='%23090909' stroke='white' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 4 3, pointer;
  }
  a[href]:not([aria-disabled="true"]), button:enabled, summary, [role="button"]:not([aria-disabled="true"]) { cursor: var(--interactive-cursor); }
  dialog { --interactive-cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) {
  .interaction-cursor { transition: none; }
}
