.home-wrap {
  width: min(92%, 83rem);
  margin-inline: auto;
}

.home-footer, .home-work-heading, .home-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-work { padding-top: clamp(2.5rem, 6vw, 5rem); }
.home-work-heading { margin-bottom: 1rem; align-items: baseline; }
.home-work-heading h2 { font-size: 1.125rem; font-weight: 600; }

.home-projects {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 2vw, 1.5rem);
  padding: 0;
  margin: 0;
}

.home-projects a { display: block; text-decoration: none; }
.home-projects a:hover .home-project-name { text-decoration: underline; }
.home-projects img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: hsl(var(--foreground) / .06);
}
.home-project-name, .home-project-type { display: block; }
.home-project-name { margin-top: .65rem; font-weight: 600; }
.home-project-type { margin-top: .15rem; color: hsl(var(--foreground) / .7); }

.home-contact {
  margin-top: clamp(3rem, 8vw, 7rem);
  padding-block: clamp(1.5rem, 4vw, 3.5rem);
  border-top: 1px solid hsl(var(--foreground) / .16);
}
.home-contact h2 { font-size: clamp(1.5rem, 4.5vw, 3.5rem); letter-spacing: -.045em; font-weight: 600; }
.home-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  padding: .5rem clamp(.7rem, 3vw, 1.5rem);
  white-space: nowrap;
  text-decoration: none;
}
.home-contact a:hover { text-decoration: underline; }
.home-footer { border-top: 1px solid hsl(var(--foreground) / .16); padding-block: 1.5rem; color: hsl(var(--foreground) / .7); }
.home-footer nav { display: flex; gap: 1rem; }
.home-wrap a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

@media (max-width: 39rem) {
  .home-wrap { width: 90%; }
  .home-projects { grid-template-columns: 1fr; gap: 1.5rem; }
  .home-projects img { aspect-ratio: 3 / 2; }
}

@media (max-width: 23rem) {
  .home-footer { flex-wrap: wrap; }
}

.f98-expertise {
  padding-block: clamp(6.5rem, 10vw, 9rem) clamp(3rem, 7vw, 6rem);
}

.f98-expertise h1 {
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.f98-expertise-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5.4rem);
}

.f98-expertise-list { grid-column: 2; grid-row: 1; }
.f98-expertise-entry + .f98-expertise-entry { margin-top: .25rem; }

.f98-expertise-entry summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .85rem;
  padding-block: clamp(.8rem, 1.7vw, 1.35rem);
  cursor: pointer;
  list-style: none;
}
.f98-expertise-entry summary::-webkit-details-marker { display: none; }
.f98-expertise-entry summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.f98-expertise-entry h2 {
  font-size: clamp(1.5rem, 2.65vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -.055em;
}
.f98-expertise-entry:not([open]) summary:not(:hover) h2 { color: hsl(var(--foreground) / .65); }

.f98-expertise-indicator {
  order: -1;
  flex: 0 0 .52rem;
  height: .52rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .66;
}
.f98-expertise-entry[open] .f98-expertise-indicator {
  background: currentColor;
  opacity: 1;
}

.f98-expertise-panel {
  padding: .3rem 0 1.45rem 1.37rem;
}
.f98-expertise-panel ul {
  display: grid;
  gap: .38rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.f98-expertise-panel li { font-size: 1rem; line-height: 1.5; color: hsl(var(--foreground) / .76); }
.f98-expertise-panel a {
  font-weight: 500;
  color: hsl(var(--foreground));
  text-decoration: none;
}
.f98-expertise-panel a:hover {
  background-color: hsl(var(--foreground) / .08);
  text-decoration: none;
}

.f98-expertise-stage {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 6rem;
}

.f98-expertise-figure { position: relative; margin: 0; }
.f98-expertise-figure a {
  display: block;
  position: relative;
  text-decoration: none;
}
.f98-expertise-project-link {
  position: absolute;
  bottom: .85rem;
  right: .85rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: .55rem .8rem;
  font-size: .875rem;
}
.f98-expertise-figure a:hover .f98-expertise-project-link {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
}
.f98-expertise-media {
  display: grid;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: hsl(var(--foreground) / .05);
}

.f98-expertise-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.f98-expertise-figure[data-visual="3d"] img { object-position: 55% 55%; }

.f98-expertise-figure[data-visual="film"] .f98-expertise-media {
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
}

.f98-expertise-figure[data-visual="film"] img:first-child { object-position: center 42%; }
.f98-expertise-figure[data-visual="film"] img:last-child { object-position: center 50%; }
.f98-expertise-figure[data-visual="ia"] img { object-position: center 61%; }
.f98-expertise-figure[data-visual="design"] .f98-expertise-media { aspect-ratio: 3 / 2; }

.f98-expertise-figure figcaption {
  padding-top: .65rem;
  font-size: .875rem;
  color: hsl(var(--foreground) / .72);
}

.f98-expertise-stage .f98-expertise-figure,
.f98-expertise-mobile { display: none; }

.f98-expertise-gallery:not(:has(details[open])) .f98-expertise-stage [data-visual="3d"],
.f98-expertise-gallery:has([data-expertise="3d"][open]) .f98-expertise-stage [data-visual="3d"],
.f98-expertise-gallery:has([data-expertise="film"][open]) .f98-expertise-stage [data-visual="film"],
.f98-expertise-gallery:has([data-expertise="ia"][open]) .f98-expertise-stage [data-visual="ia"],
.f98-expertise-gallery:has([data-expertise="design"][open]) .f98-expertise-stage [data-visual="design"] {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .f98-expertise-stage .f98-expertise-figure { animation: f98-expertise-fade .24s ease-out; }
  @keyframes f98-expertise-fade {
    from { opacity: .55; }
    to { opacity: 1; }
  }
}

.f98-expertise-contact { margin-top: clamp(2rem, 5vw, 4rem); }
.f98-expertise-contact a {
  display: inline-block;
  padding: .85rem 1.15rem;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
}

@media (max-width: 46rem) {
  .f98-expertise-gallery { display: block; }
  .f98-expertise-stage { display: none; }
  .f98-expertise-mobile { display: block; margin: 1rem 0 0 -1.37rem; }
  .f98-expertise-figure[data-visual="film"] .f98-expertise-media { aspect-ratio: 4 / 3; }
}
