:root {
  --bg: #0e0e0e;
  --fg: #f5f5f5;
  --muted: #9a9a9a;
  --accent: #ffffff;
  --border: rgba(255, 255, 255, 0.08);
  --card-bg: #1a1a1a;
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.6;
}

/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-left { justify-self: start; }
.nav-center {
  justify-self: center;
  font-weight: 400;
  letter-spacing: 0.12em;
}
.nav-right { justify-self: end; }

/* MAIN */
main {
  padding-top: 5rem;
  min-height: calc(100vh - 5rem);
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 4rem;
}

/* HOMEPAGE GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 0;
}

.card {
  display: block;
  overflow: hidden;
  cursor: pointer;
}

.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--card-bg);
}

.thumb-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  transition: transform 0.5s ease, filter 0.4s ease;
}

.card:hover .thumb-inner {
  transform: scale(1.06);
  filter: brightness(1.15);
}

.thumb-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.card:hover .thumb-inner::after {
  background: rgba(0, 0, 0, 0.25);
}

.card-title {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg);
}

/* Gradient fills for thumbnails */
.grad-1 { background: linear-gradient(135deg, #4b2a5e, #a13f6b); }
.grad-2 { background: linear-gradient(135deg, #1e3a5f, #3a7ca5); }
.grad-3 { background: linear-gradient(135deg, #7a4b1e, #d97d2a); }
.grad-4 { background: linear-gradient(135deg, #2a4d3a, #6a9e7a); }
.grad-5 { background: linear-gradient(135deg, #5a2a4d, #c4628a); }
.grad-6 { background: linear-gradient(135deg, #2a2a4a, #6060a8); }

/* PROJECT PAGE */
.project-header {
  padding-top: 3rem;
  padding-bottom: 2rem;
  text-align: center;
}

.project-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: 0.6rem;
}

.project-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  margin-bottom: 3rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.gallery-item {
  aspect-ratio: 16 / 9;
  background: #4a4a4a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* CONTACT */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding-top: 3rem;
  align-items: start;
}

.contact-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}

.bio {
  font-size: 1.1rem;
  color: var(--fg);
  margin-bottom: 1.5rem;
  max-width: 40ch;
}

.email {
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.email a {
  color: var(--fg);
  border-bottom: 1px solid var(--border);
}

.portrait {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  background: #4a4a4a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  justify-self: end;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.back-to-top {
  cursor: pointer;
}

.love {
  font-style: italic;
  letter-spacing: 0.15em;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .portrait {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .nav {
    padding: 1rem;
    font-size: 0.8rem;
  }
  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  footer {
    padding: 1.5rem 1rem;
    font-size: 0.75rem;
  }
}
