/* ===== CUSTOM PROPERTIES ===== */
:root {
  --bg: #0a0a0a;
  --text: #e8e4df;
  --text-muted: #555;
  --font-body: 'Geist Mono', 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  --font-display: 'Geist Mono', 'SF Mono', monospace;
  --font-hero: 'Bodoni Moda', 'Georgia', 'Times New Roman', serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  opacity: 0.7;
}

/* ===== FILM GRAIN OVERLAY ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 5vw, 4rem);
  background: transparent;
  transition: background 0.3s;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: opacity 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.hero-dither {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-dither canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 45%,
      rgba(10, 10, 10, 0.55) 0%,
      rgba(10, 10, 10, 0.3) 60%,
      rgba(10, 10, 10, 0.85) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
}

.hero-name {
  font-family: var(--font-hero);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text);
}

.hero-name-first {
  display: block;
  margin-left: clamp(1.5rem, 15vw, 14rem);
}

.hero-name-rule {
  display: none;
}

.hero-name-last {
  display: block;
}

.hero-subtitle {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 400;
}

.hero-location {
  font-family: var(--font-body);
  font-size: clamp(0.6rem, 0.8vw, 0.7rem);
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  opacity: 0.5;
}

.scroll-indicator {
  position: absolute;
  bottom: clamp(2rem, 5vh, 4rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: pulse 2s ease-in-out infinite;
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 40px;
  background: var(--text-muted);
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ===== SECTIONS ===== */
.section {
  padding: clamp(4rem, 10vw, 10rem) clamp(1.5rem, 5vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-body);
  font-size: clamp(0.6rem, 0.9vw, 0.75rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4.5vw, 4rem);
  line-height: 1.1;
  margin-bottom: clamp(1.5rem, 3vw, 3rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.section-text {
  font-size: clamp(0.85rem, 1.3vw, 1rem);
  line-height: 1.8;
  color: var(--text);
  max-width: 700px;
  opacity: 0.85;
}

.section-text a {
  border-bottom: 1px solid var(--text-muted);
  transition: border-color 0.3s;
}

.section-text a:hover {
  border-color: var(--text);
  opacity: 1;
}

/* ===== PROJECT SCENES ===== */
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  padding: clamp(4rem, 10vw, 10rem) clamp(1.5rem, 5vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
}

.project:nth-child(even) .project-image {
  order: 2;
}

.project-image {
  width: 100%;
  overflow: hidden;
  background: #111;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: transform 0.6s ease, filter 0.6s ease;
}

.project-image:hover img {
  transform: scale(1.03);
  filter: grayscale(0.5);
}

.project-image--text {
  background: #0e0e0e;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.project-image-label {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 4.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
  color: var(--text);
  opacity: 0.2;
}

.project-content {
  max-width: 550px;
}

.project-label {
  font-family: var(--font-body);
  font-size: clamp(0.6rem, 0.9vw, 0.75rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: clamp(0.5rem, 1vw, 1rem);
}

.project-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  line-height: 1.15;
  text-transform: uppercase;
  margin-bottom: clamp(1rem, 2vw, 2rem);
  letter-spacing: -0.02em;
}

.project-description {
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  line-height: 1.8;
  color: var(--text);
  opacity: 0.8;
}

.project-description ul {
  list-style: none;
  margin-top: 1rem;
}

.project-description li {
  padding: 0.3em 0;
  padding-left: 1.2em;
  position: relative;
}

.project-description li::before {
  content: '//';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-size: 0.8em;
}

.project-description em {
  color: var(--text-muted);
  font-style: italic;
}

/* ===== TOOLS SECTION ===== */
.tools-section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tools-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 10rem) clamp(1.5rem, 5vw, 4rem) 0;
}

.tools-section .project:last-child {
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

/* ===== FULL-BLEED IMAGE ===== */
.full-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
}

.full-bleed img {
  width: 100%;
  height: auto;
}

/* ===== ABOUT PAGE ===== */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 8rem);
  align-items: center;
  min-height: 100vh;
  padding: clamp(6rem, 12vw, 10rem) clamp(1.5rem, 5vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
}

.about-photo {
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  object-fit: cover;
  filter: grayscale(20%);
}

.about-bio {
  max-width: 550px;
}

.about-bio h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 4rem);
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: clamp(1.5rem, 3vw, 3rem);
  letter-spacing: -0.02em;
}

.about-bio p {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  line-height: 1.9;
  opacity: 0.85;
  margin-bottom: 1.5em;
}

.about-bio .social-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--text-muted);
  padding-bottom: 2px;
  transition: border-color 0.3s;
}

.about-bio .social-link:hover {
  border-color: var(--text);
  opacity: 1;
}

/* ===== FOOTER ===== */
.footer {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 5vw, 4rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  max-width: 1400px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-social a {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}

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

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .project {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2.5rem);
  }

  .project:nth-child(even) .project-image {
    order: 0;
  }

  .about-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: clamp(7rem, 15vw, 10rem);
  }

  .about-photo {
    max-width: 400px;
  }

  .hero-name-last {
    font-size: clamp(3rem, 15vw, 6rem);
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 1rem 1.2rem;
  }

  .hero-name-last {
    font-size: clamp(2.8rem, 18vw, 4.5rem);
  }
}
