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

:root {
  --bg: #0b0b0a;
  --surface: #141412;
  --border: #262522;
  --text: #ece8e1;
  --text-muted: #8f8a80;
  --accent: #c8a96e;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --max-width: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Soft film grain + warm glow behind the hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60vw 50vh at 85% 0%, rgba(200, 169, 110, .10), transparent 70%),
    radial-gradient(50vw 40vh at 0% 30%, rgba(90, 110, 140, .07), transparent 70%);
}

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

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

main, .nav, .footer {
  position: relative;
  z-index: 1;
}

/* ─── Nav ─────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(11, 11, 10, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.nav-mark {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--text-muted);
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* ─── Hero ────────────────────────────────────────── */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(72px, 14vh, 160px) var(--gutter) clamp(64px, 12vh, 140px);
}

.eyebrow {
  margin: 0 0 24px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.6rem, 13vw, 10.5rem);
  line-height: .92;
  letter-spacing: -.035em;
  font-variation-settings: "opsz" 72;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  padding-left: .55em;
}

.lede {
  max-width: 40rem;
  margin: clamp(32px, 5vh, 56px) 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.7;
  color: #bdb7ac;
}

.scroll-cue {
  display: inline-flex;
  gap: 10px;
  margin-top: 40px;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  transition: color .2s, border-color .2s;
}

.scroll-cue:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ─── Work grid ───────────────────────────────────── */

.work {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
  scroll-margin-top: 80px;
}

.project {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .4s var(--ease), transform .5s var(--ease);
}

.project:hover {
  border-color: rgba(200, 169, 110, .45);
}

.project--wide {
  grid-column: 1 / -1;
  flex-direction: row;
}

.project-media {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}

.project--wide .project-media {
  flex: 1.5;
  aspect-ratio: auto;
  min-height: 420px;
}

.project-media > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 1.2s var(--ease), filter .6s;
  filter: saturate(.92);
}

.project:hover .project-media > img:first-child {
  transform: scale(1.05);
  filter: saturate(1.05);
}

.project-media--space > img:first-child {
  object-position: 70% 50%;
}

.project-badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

.project-body {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  flex: 1;
}

.project--wide .project-body {
  justify-content: center;
}

.project-index {
  margin: 0 0 14px;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -.02em;
}

.project-desc {
  margin: 0 0 28px;
  color: #a9a398;
  max-width: 34rem;
}

.project-link {
  margin-top: auto;
  align-self: flex-start;
  font-size: .9rem;
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid rgba(200, 169, 110, .3);
  padding-bottom: 3px;
  transition: border-color .3s;
}

.project-link span {
  display: inline-block;
  transition: transform .3s var(--ease);
}

.project:hover .project-link {
  border-color: var(--accent);
}

.project:hover .project-link span {
  transform: translate(3px, -3px);
}

/* Essay card: typographic instead of a photo */

.project--essay {
  flex-direction: row-reverse;
}

.essay-quote {
  flex: 1.5;
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(36px, 6vw, 80px);
  background:
    radial-gradient(120% 90% at 100% 100%, rgba(200, 169, 110, .14), transparent 60%),
    #0f0f0d;
  border-left: 1px solid var(--border);
  min-height: 360px;
}

.essay-mark {
  position: absolute;
  top: -.12em;
  left: .12em;
  font-family: var(--serif);
  font-size: clamp(9rem, 18vw, 16rem);
  line-height: 1;
  color: rgba(200, 169, 110, .12);
  user-select: none;
}

.essay-quote blockquote {
  position: relative;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.35;
  letter-spacing: -.01em;
  color: #e4ded3;
}

/* ─── Contact ─────────────────────────────────────── */

.contact {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(96px, 16vh, 180px) var(--gutter);
  scroll-margin-top: 40px;
}

.contact h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  letter-spacing: -.03em;
  line-height: 1;
}

.contact-email {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.8rem);
  color: var(--accent);
  border-bottom: 1px solid rgba(200, 169, 110, .35);
  padding-bottom: 4px;
  word-break: break-word;
  transition: border-color .3s;
}

.contact-email:hover {
  border-color: var(--accent);
}

/* ─── Footer ──────────────────────────────────────── */

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: .82rem;
  color: var(--text-muted);
}

.footer p {
  margin: 0;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer a {
  transition: color .2s;
}

.footer a:hover {
  color: var(--text);
}

/* ─── Reveal on scroll ────────────────────────────── */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.js-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js-reveal .hero .reveal:nth-child(2) { transition-delay: .08s; }
.js-reveal .hero .reveal:nth-child(3) { transition-delay: .18s; }
.js-reveal .hero .reveal:nth-child(4) { transition-delay: .28s; }

/* ─── Responsive ──────────────────────────────────── */

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

  .project--wide,
  .project--essay {
    flex-direction: column;
  }

  .project--wide .project-media {
    flex: none;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .essay-quote {
    flex: none;
    min-height: 0;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }

  .hero h1 em {
    padding-left: .35em;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 20px;
  }

  .footer {
    flex-direction: column;
  }
}
