:root {
  --bg: #050505;
  --ink: #f7f3ec;
  --muted: rgba(247, 243, 236, 0.58);
  --faint: rgba(247, 243, 236, 0.14);
  --line: rgba(247, 243, 236, 0.12);
  --accent: #d24b35;
  --gold: #d2b47a;
  --sans: "Darker Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Playfair Display", "Noto Serif SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  overflow-x: hidden;
  --cursor-x: 50vw;
  --cursor-y: 50vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      520px circle at var(--cursor-x) var(--cursor-y),
      rgba(210, 180, 122, 0.16),
      rgba(210, 75, 53, 0.08) 32%,
      transparent 68%
    );
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.has-pointer::before {
  opacity: 1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  z-index: 100;
}

.cursor-light {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(247, 243, 236, 0.58);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(calc(var(--cursor-x) - 7px), calc(var(--cursor-y) - 7px), 0);
  transition: opacity 0.22s ease, width 0.22s ease, height 0.22s ease, border-color 0.22s ease;
  mix-blend-mode: difference;
}

body.has-pointer .cursor-light {
  opacity: 1;
}

body.is-hovering-media .cursor-light {
  width: 42px;
  height: 42px;
  border-color: rgba(247, 243, 236, 0.9);
  transform: translate3d(calc(var(--cursor-x) - 21px), calc(var(--cursor-y) - 21px), 0);
}

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

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

button {
  font: inherit;
}

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(18px, 4vw, 56px);
  color: rgba(247, 243, 236, 0.86);
  mix-blend-mode: difference;
}

.nav-brand,
.site-nav a {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
}

.site-nav nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #070707;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  filter: grayscale(1) contrast(1.16);
  transform: translate3d(calc(var(--parallax-x, 0) * -10px), calc(var(--parallax-y, 0) * -8px), 0) scale(1.04);
  transition: transform 0.2s ease-out;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.82), rgba(5, 5, 5, 0.18) 48%, rgba(5, 5, 5, 0.78)),
    linear-gradient(180deg, rgba(5, 5, 5, 0.2), #050505 94%);
}

.hero-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 18vh clamp(18px, 4vw, 56px) 9vh;
}

.hero-kicker,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: rgba(247, 243, 236, 0.56);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.hero-kicker span {
  width: 46px;
  height: 1px;
  background: rgba(247, 243, 236, 0.5);
}

.hero h1 {
  display: flex;
  flex-direction: column;
  max-width: 1180px;
  margin: 42px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.84;
  letter-spacing: 0;
}

.hero h1 span {
  font-size: clamp(72px, 16vw, 220px);
  font-family: "Noto Serif SC", var(--serif);
}

.hero h1 em {
  color: transparent;
  -webkit-text-stroke: 1px rgba(247, 243, 236, 0.45);
  font-size: clamp(50px, 11vw, 150px);
  font-style: italic;
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-top: 64px;
}

.hero-bottom p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 36px);
  font-style: italic;
  line-height: 1.2;
}

.round-link {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(247, 243, 236, 0.24);
  border-radius: 999px;
  padding: 0 26px;
  background: rgba(247, 243, 236, 0.08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.round-link:hover {
  transform: translateY(-2px) scale(1.03);
  background: var(--ink);
  border-color: var(--ink);
  color: #050505;
}

.about-section,
.work-section,
.frames-section,
.contact-section {
  padding: 112px clamp(18px, 4vw, 56px);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: center;
  max-width: 1280px;
  margin: 44px auto 0;
}

.portrait-wrap {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
  transform: translateZ(0);
}

.portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.82) contrast(1.14);
  transition: transform 0.9s ease, filter 0.9s ease;
}

.portrait-wrap:hover img {
  transform: scale(1.035);
  filter: grayscale(0.2) contrast(1.05);
}

.about-copy h2,
.work-heading h2,
.contact-section h2 {
  max-width: 920px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 86px);
  font-style: italic;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

.bio-text {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-top: 34px;
  color: var(--muted);
  line-height: 1.72;
}

.bio-text p {
  margin: 0;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 42px 0 0;
  border-block: 1px solid var(--line);
}

.profile-facts div {
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.profile-facts div:last-child {
  border-right: 0;
}

.profile-facts dt {
  margin-bottom: 8px;
  color: rgba(247, 243, 236, 0.32);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 28px 0;
}

.marquee div {
  display: flex;
  width: max-content;
  gap: 54px;
  animation: marquee 34s linear infinite;
}

.marquee:hover div {
  animation-play-state: paused;
}

.marquee span {
  color: rgba(247, 243, 236, 0.12);
  font-family: var(--serif);
  font-size: clamp(54px, 7vw, 108px);
  font-style: italic;
  white-space: nowrap;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.work-heading {
  display: block;
  align-items: end;
  max-width: 1280px;
  margin: 0 auto 64px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.work-heading h2 {
  margin-top: 22px;
}

.work-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 42px 26px;
  max-width: 1280px;
  margin: 0 auto;
}

.project-card {
  grid-column: span 6;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  perspective: 900px;
  transform: translateY(26px);
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: calc(var(--reveal-order, 0) * 45ms);
}

.project-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:nth-child(4n + 2),
.project-card:nth-child(4n + 3) {
  grid-column: span 5;
}

.project-card:nth-child(4n + 3) {
  grid-column-start: 2;
}

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(247, 243, 236, 0.08);
  background: #111;
  transform: rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out, border-color 0.35s ease, box-shadow 0.35s ease;
}

.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      340px circle at var(--card-x, 50%) var(--card-y, 50%),
      rgba(247, 243, 236, 0.26),
      transparent 48%
    );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  transition: transform 0.75s ease, filter 0.75s ease, opacity 0.75s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.045);
  filter: grayscale(0.1) contrast(1);
}

.project-card:hover .project-thumb {
  border-color: rgba(210, 180, 122, 0.44);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.project-card:hover .project-thumb::after {
  opacity: 1;
}

.project-index {
  position: absolute;
  top: 16px;
  left: 16px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(5, 5, 5, 0.5);
  color: rgba(247, 243, 236, 0.62);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  color: rgba(247, 243, 236, 0.38);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 44px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
}

.project-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.frames-section {
  padding-top: 24px;
  overflow: hidden;
}

.frames-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.frames-strip img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: none;
  cursor: zoom-in;
  transform: translateY(22px) scale(0.98);
  opacity: 0;
  transition:
    opacity 0.7s ease,
    transform 0.7s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
  transition-delay: calc(var(--reveal-order, 0) * 35ms);
}

.frames-strip img.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.frames-strip img:hover {
  border-color: rgba(210, 180, 122, 0.52);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  transform: translateY(-4px) scale(1.02);
}

.contact-section {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  min-height: 54vh;
  border-top: 1px solid var(--line);
}

.round-link.large {
  min-height: 64px;
  padding-inline: 34px;
}

.domain-line {
  margin: 30px 0 0;
  color: var(--gold);
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.project-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: min(86vh, 900px);
  border: 1px solid rgba(247, 243, 236, 0.16);
  background: #090909;
  color: var(--ink);
  padding: 0;
}

.project-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
}

.close-dialog {
  position: sticky;
  top: 14px;
  left: calc(100% - 58px);
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.72);
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.dialog-content {
  padding: 0 28px 34px;
}

.project-dialog[open] {
  animation: dialogIn 0.28s ease both;
}

.dialog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 26px;
  align-items: end;
}

.dialog-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.dialog-copy h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 66px);
  font-style: italic;
  font-weight: 500;
  line-height: 0.98;
}

.dialog-copy p {
  color: var(--muted);
}

.dialog-frames {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.dialog-frames img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.frame-preview {
  display: grid;
  gap: 16px;
  padding: 0 28px 34px;
}

.frame-preview img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: #050505;
}

.frame-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .site-nav {
    align-items: flex-start;
  }

  .site-nav nav {
    display: none;
  }

  .hero-bottom,
  .contact-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-grid,
  .work-heading,
  .dialog-hero {
    grid-template-columns: 1fr;
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .profile-facts div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .profile-facts div:last-child {
    border-bottom: 0;
  }

  .project-card,
  .project-card:nth-child(4n + 2),
  .project-card:nth-child(4n + 3) {
    grid-column: 1 / -1;
  }

  .project-card:nth-child(4n + 3) {
    grid-column-start: 1;
  }

  .frames-strip,
  .dialog-frames {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .hero-frame {
    padding-bottom: 7vh;
  }

  .hero h1 span {
    font-size: 64px;
  }

  .hero h1 em {
    font-size: 42px;
  }

  .about-section,
  .work-section,
  .frames-section,
  .contact-section {
    padding-block: 72px;
  }

  .frames-strip {
    grid-template-columns: 1fr;
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-light,
  body::before {
    display: none;
  }

  .hero-bg {
    transform: scale(1.03);
  }

  .project-thumb {
    transform: none;
  }
}

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

  .project-card,
  .frames-strip img,
  .reveal {
    opacity: 1;
    transform: none;
  }
}
