/* ============================================================
   QUERTZ — shared static portfolio styles
   ============================================================ */

@font-face {
  font-family: "FreeSans";
  src: url("../fonts/FreeSans.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbfbf8;
  --ink: #111111;
  --ink-muted: #686868;
  --ink-faint: #9a9a94;
  --rule-strong: #111111;

  --border: 1px solid var(--rule-strong);
  --border-light: 1px solid var(--rule);

  --font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --text-xs: 0.8125rem;
  --text-sm: 0.8125rem;
  --text-base: 0.8125rem;
  --text-md: 0.8125rem;
  --lh: 1.55;
  --lh-loose: 1.7;

  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-6: 3rem;
  --sp-8: 4rem;
  --sp-12: 6rem;

  --gutter: clamp(1rem, 3vw, 2.5rem);
  --max-width: 1280px;
  --editorial-width: 1040px;
  --header-h: 3.25rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: var(--lh);
}

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

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

ul, ol {
  list-style: none;
}

button {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font: inherit;
}

p + p {
  margin-top: var(--sp-2);
}

mark {
  background: transparent;
  color: inherit;
}

.label,
.section-label,
.meta-label {
  color: var(--ink-muted);
  font-size: var(--text-xs);
  font-weight: 400;
}

.link-underline,
.inline-link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.22em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.link-underline:hover,
.inline-link:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.inline-link::after {
  content: " ↗";
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.rule {
  height: 0;
  border: 0;
  border-top: var(--border-light);
  margin-block: var(--sp-3);
}

.msg-fallback {
  max-width: var(--editorial-width);
  margin-inline: auto;
  padding: var(--sp-8) var(--gutter);
}

.msg-fallback h1 {
  margin-bottom: var(--sp-2);
  font-size: var(--text-md);
  font-weight: 400;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: 100%;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-title {
  flex: 0 0 auto;
}

.site-nav {
  margin-right: auto;
}

.site-title,
.site-nav a,
.language-switcher a {
  font-size: var(--text-sm);
}

.site-title:hover,
.site-nav a:hover,
.language-switcher a:hover {
  color: var(--ink-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.site-nav a {
  color: var(--ink-muted);
}

.site-nav a.active,
.language-switcher a.active {
  color: var(--ink);
  border-bottom: 1px solid currentColor;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: auto;
}

.language-switcher a {
  color: var(--ink-muted);
}

.menu-toggle {
  display: none;
}

@media (max-width: 1100px) {
  .site-header {
    height: auto;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: var(--header-h) auto;
    align-items: center;
    gap: 0;
  }

  .menu-toggle {
    display: inline-grid;
    gap: 3px;
    width: 1.35rem;
    padding: 0.25rem 0;
    color: var(--ink);
    justify-items: stretch;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    background: currentColor;
  }

  .site-nav {
    display: none;
  }

  .site-header.is-menu-open .site-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    gap: var(--sp-1);
    padding: var(--sp-2) 0 var(--sp-3);
    background: var(--bg);
  }

  .site-header.is-menu-open .site-nav a {
    justify-self: start;
  }

  .language-switcher {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    margin-left: 0;
    padding-bottom: var(--sp-2);
  }
}

/* Footer */
.site-footer {
  margin-top: var(--sp-12);
  border-top: var(--border-light);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-4);
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 0.75rem var(--gutter) 2rem;
}

.footer-left,
.footer-right,
.footer-links {
  display: flex;
  gap: var(--sp-2);
}

.footer-left,
.footer-right {
  flex-direction: column;
}

.footer-right {
  align-items: flex-end;
}

.footer-name,
.footer-tagline,
.footer-links a,
.footer-copy {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.footer-links a:hover {
  color: var(--ink);
}

/* Home gallery */
.home-stage {
  position: relative;
}

.home-gallery {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.home-gallery.has-custom-cursor {
  cursor: none;
}

body.gallery-cursor-active {
  cursor: none;
}

.home-gallery-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 75vh;
  aspect-ratio: var(--home-gallery-ratio, 16 / 10);
  overflow: hidden;
}

.home-gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.home-gallery-img.is-active {
  opacity: 1;
}

.home-gallery-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--ink);
  opacity: 0;
  will-change: transform;
  transition: opacity 0.1s ease;
}

.home-pitch {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(0.35rem, 1vw, 0.9rem);
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 65vw;
  height: 33vh;
  pointer-events: none;
  color: var(--ink);
  font-family: "Instrument Serif", "Times New Roman", Times, serif;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.home-pitch.home-pitch--footer-visible {
  bottom: calc(var(--footer-overlap, 0px) + clamp(0.35rem, 1vw, 0.9rem));
}

.home-pitch p {
  max-width: 100%;
  margin: 0;
  text-align: right;
  text-wrap: balance;
  font-family: inherit;
  font-weight: inherit;
  font-size: clamp(1.9rem, 6.2vw, 6.8rem);
  line-height: inherit;
  letter-spacing: inherit;
}

@media (min-width: 641px) {
  html[lang="fr"] .home-pitch,
  html[lang="uk"] .home-pitch {
    width: 65vw;
    max-width: min(65vw, 44rem);
  }

  html[lang="fr"] .home-pitch p,
  html[lang="uk"] .home-pitch p {
    font-size: clamp(1.3rem, 2.8vw, 4.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-gallery-img {
    transition: none;
  }
}

@media (max-width: 640px) {
  .home-stage {
    min-height: 0;
  }

  .home-gallery {
    display: none;
  }

  .home-pitch {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    max-width: none;
    margin-inline: 0;
    padding: var(--sp-3) var(--gutter) 0;
    pointer-events: none;
    z-index: auto;
  }

  .home-pitch.home-pitch--footer-visible {
    bottom: auto;
  }

  .home-pitch p {
    text-align: left;
    font-family: var(--font);
    font-weight: 400;
    font-stretch: normal;
    font-size: var(--text-sm);
    line-height: 1.15;
    letter-spacing: 0;
    text-wrap: pretty;
  }
}

/* Home intro */
.page-intro {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--sp-3) var(--gutter) 0;
}

.intro-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-3);
  align-items: start;
}

.intro-left {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
}

.intro-title,
.intro-count {
  font-size: var(--text-sm);
}

.intro-count {
  color: var(--ink-muted);
}

.view-toggle {
  display: flex;
  align-items: baseline;
  gap: var(--sp-1);
}

.view-toggle button {
  color: var(--ink-muted);
  font-size: var(--text-sm);
  padding: 0;
  border-bottom: 1px solid transparent;
}

.toggle-separator {
  color: var(--ink-faint);
}

.view-toggle button.active {
  color: var(--ink);
  border-bottom-color: currentColor;
}

/* Home grid */
.projects-section {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--sp-6) var(--gutter) var(--sp-8);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4) var(--sp-3);
  align-items: start;
}

.project-card {
  position: relative;
  min-width: 0;
  background: transparent;
  touch-action: pan-y;
}

.project-card.is-draggable {
  cursor: grab;
}

.project-card.is-dragging {
  cursor: grabbing;
  opacity: 0.96;
  transition: none;
  user-select: none;
}

.grid-link {
  display: block;
  border: var(--border-light);
}

.grid-link:hover .card-title,
.project-link:hover,
.list-row:hover .card-titlebar-name {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: transparent;
  border-bottom: var(--border-light);
}

.card-image img,
.card-image svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.card-image img.project-thumb--contain {
  object-fit: contain;
}

.card-caption {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-1) 0.65rem;
}

.card-num,
.topbar-index,
.list-year {
  font-variant-numeric: tabular-nums;
}

.card-num::before,
.topbar-index::before {
  content: "[";
}

.card-num::after,
.topbar-index::after {
  content: "]";
}

.card-title,
.card-titlebar-name,
.sidebar-title,
.about-name {
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--lh);
}

.card-title {
  text-transform: uppercase;
}

.card-meta,
.card-excerpt,
.card-cta,
.card-category-list,
.card-year-list {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.card-titleline {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
}

.card-excerpt {
  margin-top: 0.25rem;
}

.card-cta {
  display: inline-block;
  margin-top: var(--sp-1);
}

.list-row {
  display: none;
}

.list-panel {
  display: none;
}

/* List view */
.project-grid.view-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-grid.view-list .project-card {
  width: 100% !important;
  border-top: var(--border-light);
}

.project-grid.view-list .project-card:last-child {
  border-bottom: var(--border-light);
}

.project-grid.view-list .grid-link {
  display: none;
}

.project-grid.view-list .list-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) max-content max-content 2rem;
  gap: var(--sp-2);
  width: 100%;
  min-height: 2.4rem;
  align-items: center;
  text-align: left;
}

.card-titlebar-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-category-list,
.card-year-list {
  white-space: nowrap;
}

.card-toggle-mark {
  color: var(--ink-muted);
  text-align: right;
}

.project-grid.view-list .list-panel {
  grid-template-columns: 3.2rem minmax(0, 17rem) minmax(0, 1fr);
  gap: var(--sp-2);
  padding: var(--sp-1) 0 var(--sp-3);
}

.project-grid.view-list .project-card.is-expanded .list-panel {
  display: grid;
}

.list-panel .card-image {
  border: var(--border-light);
}

.list-panel-body {
  max-width: 58ch;
}

.list-panel-body .project-link {
  display: inline-block;
  margin-top: var(--sp-2);
}

/* List hover preview */
.list-preview {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  left: 40vw;
  width: clamp(180px, 28vw, 380px);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  z-index: 150;
  background: transparent;
  border: var(--border-light);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.list-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .list-preview {
    display: block;
  }

  .list-preview.is-visible {
    opacity: 1;
  }
}

/* Project page */
.project-topbar {
  display: none;
}

.topbar-title,
.topbar-meta,
.topbar-label {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.topbar-title {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--sp-6);
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--sp-6) var(--gutter) 0;
  align-items: start;
}

.project-sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-3));
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.project-meta {
  display: grid;
  gap: var(--sp-1);
}

.meta-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: var(--sp-2);
}

.meta-value,
.sidebar-summary,
.sidebar-credits {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.sidebar-credits {
  white-space: pre-line;
}

.credits-label {
  margin-bottom: var(--sp-1);
}

.sidebar-link a::after {
  content: " ↗";
}

.sidebar-back {
  margin-top: var(--sp-2);
}

.project-content {
  min-width: 0;
}

.project-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.project-content-heading {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.project-content-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: var(--text-sm);
}

.project-arrow-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-left: auto;
  flex: 0 0 auto;
}

.project-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.project-arrow:hover {
  color: var(--ink);
}

.project-arrow[aria-disabled="true"] {
  visibility: hidden;
  pointer-events: none;
}

.project-hero {
  width: 100%;
  margin-bottom: var(--sp-6);
  background: transparent;
  border: var(--border-light);
}

.project-hero--carousel {
  padding: var(--sp-2);
}

.project-hero img,
.hero-placeholder {
  width: 100%;
  max-width: 100%;
}

.project-hero img {
  display: block;
  height: auto;
}

.hero-placeholder {
  position: relative;
  min-height: clamp(18rem, 42vw, 32rem);
  overflow: hidden;
  background: #eeeeea;
}

.hero-placeholder svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-placeholder-label {
  position: absolute;
  left: var(--sp-1);
  bottom: var(--sp-1);
  color: var(--ink-faint);
  font-size: var(--text-sm);
}

.project-carousel {
  display: grid;
  gap: var(--sp-2);
}

.project-carousel-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: clamp(18rem, 42vw, 32rem);
  outline: none;
}

.project-carousel-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  object-position: center center;
  transition: opacity 0.24s ease-in-out;
}

.project-carousel-frame img.is-active {
  opacity: 1;
}

.project-carousel-frame img.project-carousel__image--contain {
  object-fit: contain;
}

.project-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.project-carousel-count {
  color: var(--ink-muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.project-body {
  max-width: 64ch;
  margin-bottom: var(--sp-6);
}

.project-body p {
  line-height: var(--lh-loose);
}

.gallery-label {
  margin-bottom: var(--sp-2);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
}

.gallery-item {
  background: transparent;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--border-light);
}

.project-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
  padding-top: var(--sp-3);
}

.project-nav a {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.project-nav a:hover {
  color: var(--ink);
}

.nav-next {
  text-align: right;
}

/* About page */
.about-page {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--sp-6) var(--gutter) 0;
}

.about-header {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: var(--sp-6);
  max-width: var(--editorial-width);
  margin-bottom: var(--sp-6);
}

.about-tagline {
  max-width: 62ch;
  color: var(--ink-muted);
}

.about-layout {
  display: grid;
  gap: var(--sp-3);
}

.about-section {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: var(--sp-6);
  padding-block: var(--sp-2) var(--sp-4);
}

.about-section + .about-section {
  border-top: var(--border-light);
}

.section-label {
  padding-top: 0.1rem;
}

.about-section-content {
  max-width: 64ch;
}

.about-list {
  display: grid;
  gap: var(--sp-1);
}

.about-list li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--sp-2);
}

.contact-links a,
.clients-list li {
  color: var(--ink-muted);
}

.contact-links,
.clients-list {
  display: grid;
  gap: var(--sp-1);
}

.contact-links a::after {
  content: " ↗";
}

.contact-links a:hover {
  color: var(--ink);
}

/* Gateway, blog, contact, and legal pages */
.gateway-page,
.text-page {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--sp-8) var(--gutter) 0;
}

.gateway-inner,
.text-page-inner {
  max-width: var(--editorial-width);
}

.gateway-page h1,
.text-page h1 {
  margin-bottom: var(--sp-2);
  font-size: var(--text-md);
  font-weight: 400;
}

.gateway-page p,
.text-page p,
.post-list p {
  max-width: 64ch;
  color: var(--ink-muted);
}

.gateway-language-list,
.post-list {
  display: grid;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.gateway-language-list a,
.post-list a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.22em;
}

.gateway-language-list a:hover,
.post-list a:hover {
  text-decoration-color: currentColor;
}

.post-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: var(--border-light);
}

.post-list p {
  grid-column: 1 / -1;
  margin-top: 0;
}

.text-page-kicker,
.post-tags {
  color: var(--ink-faint);
  margin-bottom: var(--sp-2);
}

/* Carousel: only the active slide receives pointer events (prevents phantom clicks on hidden slides) */
.project-carousel-frame img {
  pointer-events: none;
}

.project-carousel-frame img.is-active {
  pointer-events: auto;
  cursor: zoom-in;
}

/* Photo lightbox */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease-in-out, visibility 0.35s ease-in-out;
  cursor: zoom-out;
}

.photo-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.photo-lightbox-frame {
  position: relative;
  transform: scale(0.88);
  transition: transform 0.35s ease-in-out;
  cursor: default;
}

.photo-lightbox.is-open .photo-lightbox-frame {
  transform: scale(1);
}

.photo-lightbox-img {
  display: block;
  max-width: 85vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.photo-lightbox-prev,
.photo-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  padding: 1rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.photo-lightbox-prev { left: 0.75rem; }
.photo-lightbox-next { right: 0.75rem; }

.photo-lightbox-prev:hover,
.photo-lightbox-next:hover { color: white; }

.photo-lightbox-close {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.photo-lightbox-close:hover { color: white; }

@media (prefers-reduced-motion: reduce) {
  .photo-lightbox,
  .photo-lightbox-frame {
    transition: none;
  }
}

/* Focus and responsive */
:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .project-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-title,
  .sidebar-summary {
    grid-column: 1 / -1;
  }

  .about-header,
  .about-section {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: var(--sp-4);
  }
}

@media (max-width: 640px) {
  .intro-inner,
  .footer-inner,
  .about-header,
  .about-section {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .project-grid.view-list .list-row {
    grid-template-columns: 3rem minmax(0, 1fr) 2rem;
  }

  .project-grid.view-list .card-category-list,
  .project-grid.view-list .card-year-list {
    display: none;
  }

  .project-content-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .project-arrow-nav {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .project-grid.view-list .list-panel {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .project-sidebar {
    grid-template-columns: 1fr;
  }

  .project-hero--carousel {
    padding: var(--sp-1);
  }

  .gallery-grid,
  .about-list li {
    grid-template-columns: 1fr;
  }

  .footer-right {
    align-items: flex-start;
  }
}
