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

:root {
  --white: #f7f5f2;
  --black: #0d0d0d;
  --concrete: #c8c4bc;
  --mid: #7a7570;
  --line: rgba(0,0,0,0.12);
  --line-dark: rgba(255,255,255,0.12);
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Work Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --ease: cubic-bezier(.22,.61,.36,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--black); color: var(--white); }

/* Custom cursor (desktop only) */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--black);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform .1s ease, width .25s ease, height .25s ease;
  mix-blend-mode: difference;
  background-color: var(--white);
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  .cursor.large { width: 52px; height: 52px; }
}

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 48px;
  mix-blend-mode: difference;
  transition: background .3s var(--ease);
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 20px; width: auto; transition: opacity .2s; }
.nav-logo:hover img { opacity: 0.7; }
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--white);
  text-transform: uppercase;
}
.nav-links a:hover { opacity: 0.5; }
.nav-toggle {
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 44px; height: 44px;
  margin: -11px -11px -11px 0;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 1px; background: var(--white); }

/* Hero */
.hero {
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  background: var(--black);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}
.hero-left {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 80px 6vw;
  position: relative; z-index: 2;
}
.hero-label {
  font-family: var(--mono);
  font-size: 10px; font-weight: 300;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--concrete);
  margin-bottom: 32px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 6.4vw, 92px);
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 40px;
}
.hero-title em { font-style: normal; font-weight: 300; color: var(--concrete); }
.hero-right { position: relative; overflow: hidden; }
.hero-graphic {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(7, 1fr);
  opacity: 0.18;
}
.hero-graphic span { border-right: 1px solid var(--white); border-bottom: 1px solid var(--white); }
.hero-bg-text {
  position: absolute; bottom: -20px; right: -20px;
  font-family: var(--serif);
  font-size: 280px; font-weight: 300;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.06);
  line-height: 1;
  pointer-events: none; user-select: none;
}
.hero-tag {
  position: absolute; bottom: 80px; right: 6vw;
  font-family: var(--mono);
  font-size: 10px; font-weight: 300;
  color: var(--concrete);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-scroll {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  z-index: 2;
}
.hero-scroll span {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--concrete);
}
.scroll-line {
  width: 1px; height: 56px;
  background: linear-gradient(to bottom, var(--concrete), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.6); }
}

/* Shared numbered section index */
.section-num {
  font-family: var(--mono);
  font-size: 10px; font-weight: 300;
  color: var(--mid);
  letter-spacing: 0.2em;
}

/* Intro / About */
.intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-bottom: 1px solid var(--line);
}
.intro-index {
  padding: 80px 48px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
}
.intro-index-label {
  font-family: var(--serif);
  font-size: 11px; font-weight: 300;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--mid);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: flex-start;
}
.intro-body { padding: 80px 6vw 80px 64px; }
.intro-body p.large {
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 300;
  line-height: 1.45;
  max-width: 22ch;
}
.intro-body p.large em { font-style: normal; color: var(--mid); }

/* Projects */
.projects { border-bottom: 1px solid var(--line); }
.projects-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-bottom: 1px solid var(--line);
}
.projects-header-left { padding: 48px; border-right: 1px solid var(--line); }
.projects-header-right {
  padding: 48px 64px;
  display: flex; align-items: flex-end;
}
.section-title {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-top: 16px;
}
.projects-note {
  font-family: var(--sans);
  font-size: 13px; font-weight: 400;
  line-height: 1.7;
  color: var(--mid);
  max-width: 42ch;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.project-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: block;
  cursor: pointer;
}
.project-cell:nth-child(3n) { border-right: none; }
.project-bg { position: absolute; inset: 0; }
.project-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.82);
  transition: transform .8s var(--ease), filter .5s ease;
}
.project-cell:hover .project-bg img { transform: scale(1.05); filter: saturate(1) brightness(0.9); }
.project-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 100%);
}
.project-info {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px;
  z-index: 2;
}
.project-num {
  font-family: var(--mono);
  font-size: 10px; font-weight: 300;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.15em;
}
.project-details { transform: translateY(10px); transition: transform .4s var(--ease); }
.project-cell:hover .project-details { transform: translateY(0); }
.project-name {
  font-family: var(--serif);
  font-size: 26px; font-weight: 400;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 8px;
}
.project-location {
  font-family: var(--mono);
  font-size: 10px; font-weight: 300;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; }
.contact-left {
  background: var(--black);
  padding: 96px 6vw;
  display: flex; flex-direction: column; justify-content: space-between;
}
.contact-num { color: rgba(247,245,242,0.35); }
.contact-left h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  margin-top: 24px;
}
.contact-left h2 em { font-style: normal; font-weight: 300; color: var(--concrete); }
.contact-left p {
  font-family: var(--sans);
  font-size: 13px;
  color: rgba(247,245,242,0.5);
  line-height: 1.75;
  max-width: 36ch;
  margin-top: 24px;
}
.contact-meta {
  font-family: var(--mono);
  font-size: 11px; font-weight: 300;
  color: rgba(247,245,242,0.5);
  letter-spacing: 0.08em;
  line-height: 2;
}
.contact-meta a { color: var(--white); transition: opacity .2s; }
.contact-meta a:hover { opacity: 0.6; }

.contact-right { padding: 96px 6vw; display: flex; flex-direction: column; justify-content: center; }
form { display: flex; flex-direction: column; gap: 24px; }
.hidden-field { position: absolute; left: -9999px; }
.field { display: flex; flex-direction: column; gap: 8px; }
label {
  font-family: var(--mono);
  font-size: 10px; font-weight: 300;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--mid);
}
input, textarea {
  font-family: var(--sans);
  font-size: 16px; font-weight: 400;
  color: var(--black);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  outline: none;
  transition: border-color .2s;
  border-radius: 0;
}
input:focus, textarea:focus { border-bottom-color: var(--black); }
textarea { resize: none; min-height: 90px; }
.submit-btn {
  display: inline-flex; align-items: center; gap: 16px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--white);
  background: var(--black);
  border: none;
  padding: 18px 32px;
  cursor: pointer;
  transition: background .2s;
  align-self: flex-start;
  margin-top: 8px;
}
.submit-btn:hover { background: #2a2a2a; }
.submit-btn .arrow { display: inline-block; transition: transform .2s; }
.submit-btn:hover .arrow { transform: translateX(4px); }

/* Footer */
footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 48px;
  border-top: 1px solid var(--line);
}
.footer-logo img { height: 16px; width: auto; display: block; }
.footer-legal {
  font-family: var(--mono);
  font-size: 10px; font-weight: 300;
  color: var(--mid);
  letter-spacing: 0.08em;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Project detail pages */
.project-page-hero { padding: 170px 6vw 60px; background: var(--white); }
.project-back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px; font-weight: 300;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 30px;
  transition: color .2s;
}
.project-back:hover { color: var(--black); }
.project-page-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 90px);
  line-height: 1.0;
  margin-bottom: 28px;
}
.project-page-location {
  font-family: var(--mono);
  font-size: 11px; font-weight: 300;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 24px;
}
.project-page-desc {
  font-family: var(--sans);
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 400;
  line-height: 1.75;
  color: var(--mid);
  max-width: 62ch;
}
.project-page-video { padding: 60px 6vw 0; background: var(--white); }
.project-page-video video { width: 100%; height: auto; display: block; background: #000; }
.project-page-gallery {
  padding: 80px 6vw 140px;
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.project-page-gallery figure { cursor: pointer; overflow: hidden; }
.project-page-gallery img {
  width: 100%; height: auto; display: block;
  transition: transform .8s var(--ease);
}
.project-page-gallery figure:hover img { transform: scale(1.02); }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(13,13,13,0.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
  padding: 5vw;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 90vh; }
.lightbox-close {
  position: absolute; top: 24px; right: 5vw;
  background: none; border: none;
  color: var(--white); font-size: 2rem; font-weight: 200;
  cursor: pointer; line-height: 1; opacity: 0.7;
}
.lightbox-close:hover { opacity: 1; }

/* Responsive */
@media (max-width: 900px) {
  nav { padding: 22px 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links a { display: inline-block; padding: 10px 0; font-size: 15px; letter-spacing: 0.1em; }

  .hero { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .hero-left { padding: 120px 24px 70px; }

  .intro, .projects-header, .contact { grid-template-columns: 1fr; }
  .intro-index { display: none; }
  .intro-body { padding: 60px 24px; }
  .projects-header-left, .projects-header-right { padding: 32px 24px; }
  .projects-header-left { border-right: none; border-bottom: 1px solid var(--line); }

  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .project-cell:nth-child(2n) { border-right: none; }

  .contact-left, .contact-right { padding: 60px 24px; }
  footer { flex-direction: column; gap: 14px; text-align: center; padding: 32px 24px; }

  .project-page-hero { padding: 130px 6vw 50px; }
  .project-page-gallery { padding: 50px 6vw 90px; gap: 24px; }
  .lightbox-close { top: 16px; right: 16px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-cell { border-right: none; }
  .hero-title { font-size: clamp(40px, 12vw, 64px); }
  .contact-left h2 { font-size: clamp(32px, 9vw, 44px); }
}
