:root {
  --media-gap: 16px;
  --maxw: 900px;
  --bg: #ffffff;
  --fg: rgba(0, 0, 0, 0.92);
  --fg-header: rgba(0, 0, 0, 0.85);
  --fg-soft: rgba(0, 0, 0, 0.65);
  --line: rgba(0, 0, 0, 0.12);
  --accent: #fc005d;
  --accent-soft: rgba(252, 0, 93, 0.55);
}

html {
  overflow-y: scroll;
  scroll-behavior: smooth;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: 15px;
}

.site-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 600;
  opacity: 1;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subtitle {
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: clamp(10px, 1.2vw, 12px);
  font-weight: 400;
  color: var(--fg-soft);
  opacity: 0.9;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: clamp(10px, 1.2vw, 12px);
  font-weight: 600;
}

.site-nav a {
  opacity: 0.8;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  opacity: 1;
}

.nav-dot {
  opacity: 0.55;
}

a:link,
a:visited {
  color: var(--fg);
  text-decoration: none;
  transition: 0.3s;
}

a:hover,
a:active {
  color: var(--accent);
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

::-moz-selection {
  color: #fff;
  background: #000;
}

::selection {
  color: #fff;
  background: #000;
}

.line {
  height: 1px;
  background: var(--line);
  width: 100%;
  position: relative;
}

.archive-label {
  max-width: var(--maxw);
  margin: 14px auto 10px;
  padding: 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.72rem;
  color: var(--fg-soft);
  opacity: 0.88;
}

.project-block {
  position: relative;
}

.project-reveal {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  background: #000;
  z-index: 0;
  transition: height 420ms ease;
  will-change: height;
}

.project-header-wrapper {
  width: 100%;
  position: relative;
  z-index: 1;
  background: transparent;
  border-top: none;
}

.project-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  color: var(--fg-header);
  transition: color 220ms ease;
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.5;
  opacity: 1;
  text-decoration: none;
  cursor: pointer;
}

.project-header > span {
  position: relative;
  z-index: 1;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.project-header span:first-child {
  text-transform: uppercase;
  font-weight: 500;
}

.project-header:hover {
  color: var(--accent);
  text-decoration: none;
}

.project-header:hover > span,
.project-header:focus-visible > span {
  text-decoration: underline;
}

.project-header:focus-visible {
  color: var(--accent);
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.project-block.open .project-header {
  color: #fff;
}

.project-block.open {
  background: transparent;
}

.project-content-wrapper {
  width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
  contain: layout paint;
  background: transparent;
}

.project-content {
  height: 0;
  overflow: hidden;
  transition: height 420ms ease, opacity 220ms ease;
  opacity: 0;
  color: #fff;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  will-change: height;
}

.project-content > .project-inner {
  padding: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .project-content {
    transition: none;
  }

  .project-reveal,
  .project-header {
    transition: none;
  }
}

#cursorPreview {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition: opacity 160ms ease;
  will-change: transform, opacity;
}

#cursorPreview.is-visible {
  opacity: 1;
}

#cursorPreview .cursor-preview-frame {
  position: relative;
  display: inline-block;
  border: 1px solid #000;
  background: #fff;
  line-height: 0;
  overflow: visible;
}

#cursorPreview img {
  width: 240px;
  max-width: 32vw;
  height: auto;
  display: block;
  border-radius: 0;
}

#cursorPreview .preview-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

#cursorPreview .preview-corner > .h-line,
#cursorPreview .preview-corner > .v-line {
  position: absolute;
  background: #000;
  opacity: 0.98;
}

#cursorPreview .preview-corner > .h-line {
  width: 20px;
  height: 1px;
  left: 0;
  top: 10px;
}

#cursorPreview .preview-corner > .v-line {
  width: 1px;
  height: 20px;
  left: 10px;
  top: 0;
}

#cursorPreview .corner-tl {
  left: -11px;
  top: -11px;
}

#cursorPreview .corner-tr {
  right: -10px;
  top: -11px;
}

#cursorPreview .corner-bl {
  left: -11px;
  bottom: -10px;
}

#cursorPreview .corner-br {
  right: -10px;
  bottom: -10px;
}

@media (hover: none), (pointer: coarse) {
  #cursorPreview {
    display: none;
  }
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--media-gap);
  margin-top: var(--media-gap);
}

.media-grid:first-of-type {
  margin-top: 0;
}

.media-grid > * {
  width: 100%;
}

.media-grid > * > img {
  margin-bottom: var(--media-gap);
}

.media-grid > * > img:last-child {
  margin-bottom: 0;
}

img,
video,
iframe {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  border: none;
}

iframe {
  aspect-ratio: 16 / 9;
}

p {
  font-size: 0.85rem;
  color: var(--fg-soft);
  line-height: 1.55;
  font-weight: 300;
  letter-spacing: 0.012em;
}

.project-content-wrapper p {
  color: rgba(255, 255, 255, 0.68);
}

.project-content-wrapper a:link,
.project-content-wrapper a:visited {
  color: #fff;
}

.project-content-wrapper a:hover,
.project-content-wrapper a:active {
  color: var(--accent);
}

.project-content-wrapper ::-moz-selection {
  color: #000;
  background: #fff;
}

.project-content-wrapper ::selection {
  color: #000;
  background: #fff;
}

@media screen and (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    font-size: clamp(11px, 1.4vw, 14px);
    padding: 10px 20px;
    justify-content: center;
  }
}
