@font-face {
  font-family: "Basier Mono";
  src: url("fonts/basier-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Saint";
  src: url("fonts/saint.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #fff;
  font-family: "linotype-didot", serif;
  font-weight: 400;
  font-style: normal;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: none;
}

@keyframes pixel-cursor-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

#pixel-cursor {
  position: fixed;
  width: 96px;
  height: 96px;
  pointer-events: none;
  z-index: 99999;
  left: 0;
  top: 0;
  animation: pixel-cursor-spin 5s linear infinite;
}

/* Two layers: shrink main → then grow work (and reverse); 0.15s + 0.15s = 0.3s */
#pixel-cursor .pixel-cursor__main,
#pixel-cursor .pixel-cursor__work {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

#pixel-cursor .pixel-cursor__main {
  background-image: url("cursor/main.png");
}

#pixel-cursor .pixel-cursor__work {
  background-image: url("cursor/work-clear.png");
}

#pixel-cursor.is-work .pixel-cursor__main {
  transform: scale(0);
  opacity: 0;
  transition-delay: 0s;
}

#pixel-cursor.is-work .pixel-cursor__work {
  transform: scale(1);
  opacity: 1;
  transition-delay: 0.15s;
}

#pixel-cursor:not(.is-work) .pixel-cursor__main {
  transform: scale(1);
  opacity: 1;
  transition-delay: 0.15s;
}

#pixel-cursor:not(.is-work) .pixel-cursor__work {
  transform: scale(0);
  opacity: 0;
  transition-delay: 0s;
}

::selection {
  background: rgb(65, 65, 255);
  color: #ffffff;
}

::-moz-selection {
  background: rgb(65, 65, 255);
  color: #ffffff;
}

header {
  display: grid;
  grid-template-columns: max-content 1fr 140px; /* h1 | header-desc | nav */
  background-color: transparent;
  align-items: start;
  padding: 18px 34px;
  column-gap: 40px;
  position: relative;
  /* Below main.columns so project grid can scroll/paint over the header */
  z-index: 1;
}

header h1 {
  margin: 0;
  grid-column: 1;
  font-family: "Times New Roman", Times, serif;
  font-size: 54px;
  font-weight: 300;
  color: rgb(65, 65, 255);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

header h1 .home-title-link {
  color: inherit;
  text-decoration: none;
  display: contents;
}

header h1 .h1-word {
  display: inline;
}

header h1 .h1-word + .h1-word {
  margin-left: 0.22em;
}

header h1 .saint {
  font-family: "Saint", "Times New Roman", Times, serif;
  font-weight: 400;
  font-size: 0.92em;
  line-height: 1;
  display: inline-block;
  transform: translateY(0.02em);
}

@media (max-width: 1200px) {
  header h1 {
    white-space: normal;
  }

  header h1 .h1-word {
    display: block;
  }

  header h1 .h1-word + .h1-word {
    margin-left: 0;
    margin-top: 0.05em;
  }
}

header .header-desc {
  margin-top: 4px;
  grid-column: 2;
  min-width: 0;
}

header .header-desc h2 {
  margin: 0;
  font-family: inherit;
  font-size: calc(1.5rem + 2px);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
}

header .header-desc h2 .h2-gap-after {
  margin-right: 0.35em;
}

header .header-desc p {
  margin: 8px 0 0 0;
  font-family: "Basier Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: calc(0.9rem);
  line-height: 1.25;
  max-width: 850px;
  color: #000;
}

  header nav {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    font-family: "Basier Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
      "Liberation Mono", "Courier New", monospace;
    line-height: 1;
    gap: 6px;
    text-align: end;
    justify-self: end;
    margin: 0;
    padding: 0;
  }
  header nav li {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
  }
  header nav li a {
    text-decoration: none;
    color: black;
    display: inline-block;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  /* Index: WORK link (reload home) */
  header nav li a[data-home-reload] {
    color: rgb(65, 65, 255);
  }

  header .header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
  }

  header .header-action {
    width: 24px;
    height: 24px;
    border: 1px solid #000;
    border-radius: 6px;
    background: #fff;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
  }

  header .header-action.is-active {
    background: #d7d7d7;
  }

main.columns {
  --col-rule: 1px;
  --col-rule-color: rgba(0, 0, 0, 0.45);
  --corner-size: 14px;
  --cross-arm-extra: 0px;
  --rule-nudge: 2px;
  --cross-nudge: 10px;
  --cap-rule-inset: 22px;
  --side-end-inset: 14px;
  --cap-top-shift: 8px;

  font-family: "Basier Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;

  min-height: 50vh;
  height: auto;
  margin-top: auto;
  padding: 0 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  gap: 17px;
  overflow: visible;
  position: relative;
  z-index: 2;
  background: #fff; /* paints over header (z-index 1) when columns overlap */
}

.col {
  position: relative;
  height: auto;
  min-height: 0;
  overflow: visible;
  will-change: transform;
}

.col-heading {
  margin: 0 0 10px;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: #616161;
  line-height: 1.2;
}

.col-inner {
  display: flex;
  flex-direction: column;
  position: relative;
  background: #fff;
  min-height: 0;
}

/* one continuous left/right border line, shortened at both ends */
.col-inner::before,
.col-inner::after {
  content: "";
  position: absolute;
  top: var(--side-end-inset);
  bottom: var(--side-end-inset);
  width: var(--col-rule);
  background: var(--col-rule-color);
  pointer-events: none;
}

.col-inner::before {
  left: 0;
}

.col-inner::after {
  right: 0;
}

.col-cap {
  position: relative;
  height: 26px;
  flex: 0 0 auto;
  overflow: visible;
}

/* horizontal rule per cap, aligned to cross center */
.col-cap::before {
  content: "";
  position: absolute;
  left: var(--cap-rule-inset);
  right: var(--cap-rule-inset);
  height: var(--col-rule);
  background: var(--col-rule-color);
  pointer-events: none;
}

.col-cap--top::before {
  top: calc(var(--corner-size) * -0.5 - var(--rule-nudge) + var(--cap-top-shift));
}

.col-cap--bottom::before {
  top: auto;
  bottom: calc(var(--corner-size) * -0.5 - var(--rule-nudge));
}

.col-corner {
  position: absolute;
  top: 0;
  background: #fff;
  width: var(--corner-size);
  height: var(--corner-size);
}

.col-corner--left {
  left: 0;
  transform: translate(-50%, calc(var(--corner-size) * -0.5 - var(--cross-nudge)));
}

.col-corner--right {
  right: 0;
  transform: translate(50%, calc(var(--corner-size) * -0.5 - var(--cross-nudge)));
}

.col-cap--top .col-corner--left {
  transform: translate(-50%, calc(var(--corner-size) * -0.5 - var(--cross-nudge) + var(--cap-top-shift)));
}

.col-cap--top .col-corner--right {
  transform: translate(50%, calc(var(--corner-size) * -0.5 - var(--cross-nudge) + var(--cap-top-shift)));
}

.col-cap--bottom .col-corner {
  top: auto;
  bottom: 0;
}

.col-cap--bottom .col-corner--left {
  transform: translate(-50%, calc(var(--corner-size) * 0.5 + var(--cross-nudge)));
}

.col-cap--bottom .col-corner--right {
  transform: translate(50%, calc(var(--corner-size) * 0.5 + var(--cross-nudge)));
}

/* draw cross with same thickness as borders */
.col-corner::before,
.col-corner::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--col-rule-color);
  transform: translate(-50%, -50%);
}

.col-corner::before {
  width: calc(var(--corner-size) + var(--cross-arm-extra));
  height: var(--col-rule);
}

.col-corner::after {
  width: var(--col-rule);
  height: calc(var(--corner-size) + var(--cross-arm-extra));
}

.col-body {
  flex: 0 0 auto;
  min-height: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
}

/* Vertical stack of project blocks — add <article class="col-project">…</article> siblings inside .col-projects */
.col-projects {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 0;
  padding: 0 10px;
}

.col-project {
  --project-grid-media-gap: 40px;
  --project-media-bottom-pad: 84px;
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  box-sizing: border-box;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--project-grid-media-gap);
  padding: 14px 0 var(--project-media-bottom-pad);
  text-transform: uppercase;
  filter: blur(2px) saturate(0.82);
  transition: filter 0.35s ease;
}

.col-project:hover {
  filter: none;
}

/* Subtle pixel / scanline mesh — fades on hover */
.col-project::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.45;
  transition: opacity 0.35s ease;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.07) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 1px, transparent 1px 4px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

.col-project:hover::before {
  opacity: 0;
}

.col-projects > .col-project:last-child {
  padding-bottom: 14px;
}

/* Whole-card link to a work page */
a.col-project__link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--project-grid-media-gap);
  flex: 1 1 auto;
  min-height: 0;
  color: inherit;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

a.col-project__link .col-project__title {
  text-decoration: none;
}

a.col-project__link:focus-visible {
  outline: 2px solid rgb(65, 65, 255);
  outline-offset: 4px;
}

/* 8-column grid: row1 num aligns with info (2 cols), title aligns with association (cols 3–8) */
.col-project__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 20px;
  align-items: center;
  justify-items: start;
  text-align: left;
  flex: 0 0 auto;
  width: calc(100% - 36px);
  max-width: calc(100% - 36px);
  margin-inline: 18px;
  box-sizing: border-box;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.2;
  color: #000;
}

.col-project__num {
  grid-column: 1 / 3;
  grid-row: 1;
  font-variant-numeric: tabular-nums;
  color: #000;
}

.col-project__title {
  grid-column: 3 / 9;
  grid-row: 1;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  font-style: normal;
  letter-spacing: normal;
  line-height: inherit;
  color: rgb(65, 65, 255);
  min-width: 0;
  white-space: nowrap;
  overflow-x: auto;
}

.col-project__info-label {
  grid-column: 1 / 3;
  grid-row: 2;
  color: #757575;
  text-transform: lowercase;
  font-size: 11px;
}

.col-project__association {
  grid-column: 3 / 7;
  grid-row: 2;
  margin: 0;
  min-width: 0;
  color: #757575;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  overflow-x: auto;
}

.col-project__date {
  grid-column: 7 / 9;
  grid-row: 2;
  margin: 0;
  color: #757575;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  justify-self: end;
  text-align: right;
}

.col-project__media {
  position: relative;
  z-index: 1;
  align-self: stretch;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  background: #ececec;
}

.col-project__media img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin-inline: auto;
}

.col-project:not(:hover) .col-project__media img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.col-project:hover .col-project__media img {
  image-rendering: auto;
}

.col-project__media img:not([src]),
.col-project__media img[src=""] {
  display: none;
}

.col:nth-child(2) .col-inner {
  --col-gradient: none;
}

.col:nth-child(3) .col-inner {
  --col-gradient: none;
}

.col:nth-child(4) .col-inner {
  --col-gradient: none;
}

/* —— About page —— */
body.about-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}

body.about-page .header-actions {
  visibility: hidden;
  pointer-events: none;
}

body.about-page header {
  flex-shrink: 0;
}

header nav li a[aria-current="page"] {
  color: rgb(65, 65, 255);
}

/* About page: type tweaks (scoped to body.about-page) */
body.about-page header .header-action {
  font-size: 15px;
}

body.about-page .about-label {
  font-size: 17px;
}

body.about-page .about-photo__placeholder {
  font-size: 15px;
}

body.about-page .about-copy {
  font-size: calc(0.9rem + 1px);
}

body.about-page .about-lede {
  font-size: calc(1.05rem + 3px);
}

body.about-page .about-detail__title {
  font-size: 17px;
}

body.about-page .about-detail__body {
  font-size: calc(0.9rem + 1px);
}

body.about-page .about-social__icon {
  width: 25px;
  height: 25px;
}

body.about-page .modal-title {
  font-size: 17px;
}

body.about-page .modal-close {
  font-size: 15px;
}

.about-main {
  flex: 1 1 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 24px 28px 48px;
  position: relative;
  z-index: 2;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  min-height: 0;
}

.about-inner {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-label {
  margin: 0 0 10px;
  font-family: "Basier Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #616161;
  text-align: center;
  width: 100%;
  max-width: 288px;
  align-self: center;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(240px, 400px) 1fr;
  gap: 40px 56px;
  align-items: center;
  width: 100%;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.about-photo {
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.about-social--photo {
  margin: 0;
  padding: 0;
  border: none;
  justify-content: center;
  width: 100%;
  max-width: 288px;
}

.about-photo__frame {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 288px;
  border: 1.5px solid rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.about-photo__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-photo__placeholder {
  font-family: "Basier Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  text-align: center;
  padding: 16px;
}

.about-copy {
  font-family: "Basier Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: calc(0.9rem - 2px);
  line-height: 1.5;
  color: #000;
}

.about-lede {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(65, 65, 255);
  line-height: 1.35;
}

.about-copy p:not(.about-lede) {
  margin: 0 0 1rem;
}

.about-copy p:not(.about-lede):last-of-type {
  margin-bottom: 0;
}

.about-social {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.about-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #000;
  border-radius: 6px;
  background: #fff;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.about-social__link:hover,
.about-social__link:focus-visible {
  color: rgb(65, 65, 255);
  border-color: rgb(65, 65, 255);
  background: rgba(65, 65, 255, 0.06);
  outline: none;
}

.about-social__icon {
  display: block;
}

.about-details {
  display: grid;
  gap: 22px 48px;
}

.about-copy .about-details {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  grid-template-columns: 1fr;
}

@media (min-width: 1100px) {
  .about-copy .about-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.about-detail__title {
  margin: 0 0 10px;
  font-family: "Basier Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(65, 65, 255);
}

.about-detail__body {
  margin: 0;
  font-family: "Basier Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: calc(0.9rem - 2px);
  line-height: 1.5;
  color: #000;
}

/* Archive — coming soon modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90000;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-panel {
  position: relative;
  width: 50%;
  height: 30vh;
  max-width: 640px;
  min-width: min(100%, 280px);
  background: #fff;
  border: 1.5px solid #000;
  padding: 36px 28px 28px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-title {
  margin: 0;
  text-align: center;
  font-family: "Basier Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 15px;
  height: 15px;
  padding: 0;
  margin: 0;
  border: 1px solid #000;
  border-radius: 2px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #000;
}

@media (max-width: 600px) {
  .modal-panel {
    width: min(90vw, 100%);
  }
}

/* Index: show mobile under-construction screen */
.mobile-uc {
  display: none;
}

@media (max-width: 768px) {
  body.index-page {
    cursor: auto;
    overflow: hidden;
  }

  body.index-page #pixel-cursor,
  body.index-page header,
  body.index-page main,
  body.index-page #archive-modal {
    display: none !important;
  }

  body.index-page .mobile-uc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 28px;
    box-sizing: border-box;
    background: #fff;
    font-family: inherit; /* same as index */
    font-size: 16px;
    line-height: 1.35;
  }

  body.index-page .mobile-uc__title,
  body.index-page .mobile-uc__body {
    margin: 0;
    font-size: 16px;
  }

  body.index-page .mobile-uc__title {
    color: rgb(65, 65, 255);
  }

  body.index-page .mobile-uc__body {
    color: #000;
  }
}