:root {
  --paper: #f3f0e9;
  --ink: #090909;
  --white: #f6f4ef;
  --line: rgba(255, 255, 255, 0.34);
  --muted: rgba(255, 255, 255, 0.56);
  --page-x: clamp(18px, 2.35vw, 42px);
  --page-y: clamp(18px, 2vw, 34px);
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  font-family: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.portfolio-home,
.preview-stack,
.preview,
.preview-overlay,
.preview-grain {
  position: fixed;
  inset: 0;
}

.portfolio-home {
  overflow: hidden;
  isolation: isolate;
  background: #111;
}

.preview-stack {
  z-index: -2;
  overflow: hidden;
  background: #111;
}

.preview {
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.035);
  transition:
    opacity 0.58s ease,
    transform 1.3s var(--ease),
    visibility 0s linear 0.58s;
}

.preview.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition:
    opacity 0.58s ease,
    transform 1.3s var(--ease),
    visibility 0s;
}

.preview iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.7778vh);
  height: max(100vh, 56.25vw);
  min-width: 0;
  min-height: 0;
  border: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.preview-overlay {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.28) 43%, rgba(0, 0, 0, 0.25) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.27) 100%);
}

.preview-grain {
  z-index: 3;
  opacity: 0.055;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--page-y) var(--page-x);
}

.brand,
.nav-button,
.directory-heading,
.project-number,
.directory-footer,
.info-topbar,
.info-role,
.info-links {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand {
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: clamp(17px, 2vw, 30px);
}

.nav-button {
  position: relative;
  opacity: 0.58;
  transition: opacity 0.25s ease;
}

.nav-button:hover,
.nav-button.is-active {
  opacity: 1;
}

.nav-button.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: currentColor;
}

.project-directory {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100%;
  padding: clamp(78px, 9vh, 108px) var(--page-x) var(--page-y);
}

.directory-heading,
.directory-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(18px, 2.4vw, 38px);
  color: var(--muted);
}

.project-list {
  align-self: center;
  width: min(100%, 1380px);
}

.project-row {
  position: relative;
  display: grid;
  grid-template-columns: clamp(30px, 3vw, 50px) minmax(0, 1fr);
  align-items: baseline;
  gap: clamp(10px, 1.8vw, 28px);
  width: 100%;
  padding: clamp(6px, 0.75vh, 10px) 0;
  cursor: pointer;
  opacity: 0.4;
  transition:
    opacity 0.35s ease,
    padding-left 0.55s var(--ease);
}


.project-row:hover,
.project-row:focus-visible,
.project-row.is-active {
  opacity: 1;
}

.project-row:hover,
.project-row:focus-visible {
  padding-left: clamp(5px, 0.7vw, 12px);
}

.project-number,

.project-number {
  color: rgba(255, 255, 255, 0.72);
}

.project-title {
  min-width: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(13px, 1.35vw, 22px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.018em;
  white-space: nowrap;
}




.mobile-hint {
  display: none;
}

.info-panel {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: var(--page-y) var(--page-x);
  background: var(--paper);
  color: var(--ink);
  visibility: hidden;
  opacity: 0;
  transform: translateY(100%);
  transition:
    transform 0.9s var(--ease),
    opacity 0.55s ease,
    visibility 0s linear 0.9s;
}

.info-panel.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition:
    transform 0.9s var(--ease),
    opacity 0.55s ease,
    visibility 0s;
}

.info-topbar {
  display: flex;
  justify-content: space-between;
}

.info-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.55fr);
  grid-template-rows: auto 1fr auto;
  gap: 25px 8vw;
  align-items: end;
  padding-top: clamp(70px, 10vh, 150px);
}

.info-role {
  grid-column: 1 / -1;
  align-self: start;
  margin: 0;
}

.info-content h1 {
  align-self: end;
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(68px, 11vw, 180px);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: -0.055em;
}


.info-side {
  grid-column: 2;
  align-self: end;
  min-width: 0;
}

.info-copy {
  align-self: end;
  max-width: 440px;
  margin: 0 0 0.6em;
  font-size: clamp(18px, 1.65vw, 28px);
  font-weight: 350;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.info-links {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}


.info-links .contact-link {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 15px 12px;
  margin: -11px 0 -12px -15px;
  border: 1px solid rgba(9, 9, 9, 0.28);
  border-radius: 999px;
  text-transform: none;
  opacity: 1;
}

.info-links .contact-link span {
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  opacity: 0.58;
}

.info-links .contact-link strong {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.info-links .contact-link:hover {
  opacity: 1;
  background: rgba(9, 9, 9, 0.06);
}

.info-links a,
.info-close {
  transition: opacity 0.2s ease;
}

.info-links a:hover,
.info-close:hover {
  opacity: 0.48;
}



.instagram-link {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 0.72 !important;
}

.instagram-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
}

.instagram-link .ig-dot {
  fill: currentColor;
  stroke: none;
}

.instagram-link:hover {
  background: transparent;
  opacity: 1 !important;
}

@media (hover: hover) and (pointer: fine) {
  .project-row { cursor: none; }
}

.cursor-label {
  position: fixed;
  z-index: 45;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition:
    opacity 0.22s ease,
    transform 0.35s var(--ease);
}



.cursor-label.is-visible {
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 820px) {
  :root {
    --page-x: 18px;
    --page-y: 20px;
  }

  .brand,
  .nav-button,
  .directory-heading,
  .project-number,
  .directory-footer,
  .info-topbar,
  .info-role,
  .info-links {
    font-size: 8px;
  }

  .preview-overlay {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.25) 42%, rgba(0, 0, 0, 0.54)),
      linear-gradient(90deg, rgba(0, 0, 0, 0.25), transparent);
  }

  .project-directory {
    padding-top: 86px;
  }

  .project-row {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    opacity: 0.58;
  }

  .project-row:hover,
  .project-row:focus-visible {
    padding-left: 0;
  }

  .project-title {
    overflow: hidden;
    font-size: clamp(15px, 4vw, 19px);
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-hint {
    display: none;
  }

  .mobile-hint {
    display: inline;
  }

  .info-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 24px;
    align-items: start;
    padding-top: 80px;
  }

  .info-content h1 {
    align-self: start;
    font-size: clamp(68px, 21vw, 116px);
  }

  
.info-side {
  grid-column: 2;
  align-self: end;
  min-width: 0;
}

.info-copy {
    align-self: end;
    font-size: 19px;
  }

  .info-links {
    grid-column: auto;
  }

  .cursor-label {
    display: none;
  }
}

@media (max-height: 620px) and (min-width: 821px) {
  .project-directory {
    padding-top: 72px;
  }

  .project-title {
    font-size: clamp(13px, 3.1vh, 20px);
  }

  .project-row {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
