:root {
  --bg: #000000;
  --accent: #ffcc00;
  /* Yellow from screenshot */
  --text: #ffffff;
  --nav-text: #8c8c8c;
}

* {
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Header & Nav */
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 1.5rem 4rem;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  border-bottom: 1px solid #1a1a1a;
  z-index: -1;
  transform-origin: left;
  animation: sweepBar 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes sweepBar {
  0% {
    transform: scaleX(0);
  }

  100% {
    transform: scaleX(1);
  }
}

.logo {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.logo-bar {
  width: 5px;
  height: 45px;
  background-color: var(--accent);
  margin-top: 2px;
}

.logo h1 {
  margin: 0;
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.8em;
  text-transform: uppercase;
  color: var(--accent);
}

nav {
  display: flex;
  gap: 0.5rem;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  padding: 15px 0 0 0;
  text-align: center;
  min-width: 120px;
  display: inline-block;
  transition: color 0.3s;
  font-weight: 400;
}

nav a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  /* 2px baseline makes a 1px line when scaled 50% thinner */
  background: var(--accent);
  opacity: 1;
  transform: scaleX(1) scaleY(1);
  transform-origin: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

nav a:hover::before {
  transform: scaleX(0.4) scaleY(0.5);
  /* Shortens to 40% width, becomes 50% thinner */
}

nav a:hover,
nav a.active {
  color: #fff;
}

nav a:hover {
  animation: violentShake 0.06s linear infinite;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(255, 204, 0, 0.45);
  border-radius: 2px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.navbar.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.navbar.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.navbar.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-toggle:focus-visible,
nav a:focus-visible,
#close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@keyframes violentShake {
  0% {
    color: #fff;
    text-shadow: none;
  }

  15% {
    color: transparent;
    text-shadow: -5px 0 2px #fff, -15px 1px 6px rgba(255, 255, 255, 0.7), -30px 1px 12px rgba(255, 255, 255, 0.3);
  }

  30% {
    color: transparent;
    text-shadow: 5px 0 2px #fff, 15px -1px 6px rgba(255, 255, 255, 0.7), 30px -1px 12px rgba(255, 255, 255, 0.3);
  }

  45% {
    color: transparent;
    text-shadow: -8px 0 3px #fff, -20px -1px 8px rgba(255, 255, 255, 0.7), -40px -2px 16px rgba(255, 255, 255, 0.3);
  }

  60% {
    color: transparent;
    text-shadow: 8px 0 3px #fff, 20px 1px 8px rgba(255, 255, 255, 0.7), 40px 2px 16px rgba(255, 255, 255, 0.3);
  }

  75% {
    color: transparent;
    text-shadow: -6px 0 2px #fff, -16px 0 6px rgba(255, 255, 255, 0.7), -35px -1px 12px rgba(255, 255, 255, 0.3);
  }

  90% {
    color: transparent;
    text-shadow: 6px 0 2px #fff, 16px 0 6px rgba(255, 255, 255, 0.7), 35px 1px 12px rgba(255, 255, 255, 0.3);
  }

  100% {
    color: #fff;
    text-shadow: none;
  }
}

/* Gallery Edge-to-Edge Grid (Collage Style) */
main#gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}

.card {
  position: relative;
  background: #000;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #000;
  /* Original border color and width */
}

.card img,
.card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
  filter: brightness(0.85);
}

/* Adjust Nappy_08 positioning */
.card-Nappy_08 video {
  object-position: right center;
}

.card-Undergroundark_18 video {
  object-position: 87% 50%;
  /* 2% further right */
}


/* Collage repeating pattern (matching references) */
.card:nth-child(10n + 1) {
  grid-column: span 6;
  aspect-ratio: 21 / 9;
}

.card:nth-child(10n + 2),
.card:nth-child(10n + 3),
.card:nth-child(10n + 4) {
  grid-column: span 2;
  aspect-ratio: 4 / 3;
}

.card:nth-child(10n + 5),
.card:nth-child(10n + 6) {
  grid-column: span 3;
  aspect-ratio: 16 / 10;
}

.card:nth-child(10n + 7) {
  grid-column: span 4;
  aspect-ratio: 16 / 9;
}

.card:nth-child(10n + 8) {
  grid-column: span 2;
  aspect-ratio: 4 / 3;
}

.card:nth-child(10n + 9),
.card:nth-child(10n + 10) {
  grid-column: span 3;
  aspect-ratio: 16 / 10;
}

.card:hover img,
.card:hover video {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 2rem 1.5rem 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.card:hover .card-info {
  opacity: 1;
  transform: translateY(0);
}

.tag-line {
  display: block;
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-info span {
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-top: 0.5rem;
}

/* Viewer */
#viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.98);
  display: flex;
  flex-direction: column;
  justify-content: center; /* center vertically */
  align-items: center;
  backdrop-filter: blur(10px);
  z-index: 1000;
}

#viewer.hidden {
  display: none;
}

#viewer-content video,
#viewer-content img {
  max-width: 100%;
  max-height: 80vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

#viewer-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  max-width: 95vw;
  max-height: 90vh;
  padding: 0 2rem;
  margin-top: 0; /* remove top margin */
}

#viewer-content {
  flex: 1 1 auto;
  max-width: calc(100% - 260px - 2rem);
  max-height: 80vh;
}

#viewer-info {
  flex: 0 0 260px;
  color: #fff;
  font-size: 1.1rem;
  text-align: left;
  margin-top: 0.2rem;
  overflow-y: auto;
}

#viewer-info strong {
  color: var(--accent);
  margin-right: 10px;
  display: block;
  margin-bottom: 2rem; /* space after title */
}

.tag-line {
  display: block;
  margin-bottom: 2rem; /* space after tag */
}
#viewer-info .blurb {
  display: block;
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.75);
  text-align: left;
  text-transform: none;
  line-height: 1.7;
  font-weight: 100;
  font-size: 0.85rem;
}


#close {
  position: absolute;
  top: 30px;
  right: 40px;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 4rem;
  line-height: 1;
  cursor: pointer;
  color: #8c8c8c;
  transition: color 0.3s;
}

#close:hover {
  color: var(--accent);
}

/* Responsive Grid Styling */
@media (max-width: 1024px) {
  main#gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .card:nth-child(10n + 1) {
    grid-column: span 4;
    aspect-ratio: 16 / 7;
  }

  .card:nth-child(10n + 2),
  .card:nth-child(10n + 3) {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
  }

  .card:nth-child(10n + 4) {
    grid-column: span 4;
    aspect-ratio: 16 / 7;
  }

  .card:nth-child(10n + 5),
  .card:nth-child(10n + 6) {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
  }

  .card:nth-child(10n + 7) {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
  }

  .card:nth-child(10n + 8) {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
  }

  .card:nth-child(10n + 9),
  .card:nth-child(10n + 10) {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 768px) {
  main#gallery {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .card {
    grid-column: span 1 !important;
    aspect-ratio: 16 / 9 !important;
  }

  .navbar {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* -------------------------------- */
/* About Page Split Screen */
/* -------------------------------- */
.about-container {
  position: relative;
  display: flex;
  width: 100%;
  min-height: calc(100vh - 85px);
  overflow: hidden;
}

.about-left {
  position: relative;
  z-index: 1;
  width: 45%;
  padding: 4rem 2rem 4rem 8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-title {
  color: var(--accent);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-weight: normal;
}

.about-text {
  color: #a0a0a0;
  font-size: 0.8rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.about-text p {
  margin-bottom: 1.2rem;
}

.about-circular-img {
  width: 225px;
  height: 225px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 2rem;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.about-circular-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.software-icons {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
}

.software-icons img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px;
}

.about-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  mask-image: linear-gradient(to right, transparent 0%, transparent 20%, black 50%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 20%, black 50%);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  filter: grayscale(100%) contrast(1.1);
  transform: scale(1.6) translateX(12%);
  transform-origin: right center;
}

@media (max-width: 1024px) {
  .about-container {
    flex-direction: column;
  }

  .about-left {
    padding: 3rem;
  }

  .about-right {
    min-height: 60vh;
  }
}

/* -------------------------------- */
/* Home Page Video Background */
/* -------------------------------- */
.home-page {
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #000;
}

.video-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: #000;
}

.video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
}

.transparent-nav {
  background: transparent !important;
  border-bottom: none !important;
  position: absolute;
  /* Ensures it floats over the video */
  width: 100%;
}

.transparent-nav::before {
  display: none !important;
}

/* -------------------------------- */
/* Reel Page YouTube Embed */
/* -------------------------------- */
.reel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: calc(100vh - 85px);
  padding: 4rem 2rem;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1800px;
  /* 25% smaller than previous */
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid #1a1a1a;
}




.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* -------------------------------- */
/* Contact Page */
/* -------------------------------- */
.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 85px);
  gap: 6rem;
  padding: 2rem;
}

.contact-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 250px;
}

.contact-col svg {
  width: 35px;
  height: 35px;
  margin-bottom: 1.5rem;
}

.contact-col h2 {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.3rem;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 1rem 0;
  letter-spacing: 0.05em;
  font-weight: normal;
}

.contact-col p {
  color: #cca300;
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.contact-col p.sub-text {
  font-size: 0.7rem;
  margin-top: 0.5rem;
}

.contact-divider {
  width: 1px;
  height: 120px;
  background-color: rgba(255, 204, 0, 0.3);
}

@media (max-width: 900px) {
  .navbar {
    gap: 2rem;
    padding-inline: 2rem;
  }

  nav a {
    min-width: 96px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .about-container {
    flex-direction: row;
    min-height: calc(100vh - 85px);
    overflow: hidden;
  }

  .about-left {
    width: 56%;
    padding: 3rem 2rem 3rem 4rem;
  }

  .about-right {
    position: absolute;
    inset: 0 0 auto auto;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .portrait-img {
    transform: scale(1.35) translateX(8%);
  }

  .contact-container {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 76px;
    padding: 0.9rem 1rem;
  }

  .transparent-nav {
    position: absolute;
  }

  .home-page .nav-toggle {
    background: transparent;
    border: 0;
  }

  .home-page .navbar nav {
    background: transparent;
    border: 0;
  }

  .logo {
    align-items: center;
    min-width: 0;
  }

  .logo-bar {
    width: 4px;
    height: 36px;
  }

  .logo h1 {
    font-size: 1rem;
    letter-spacing: 0.42em;
    white-space: nowrap;
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .navbar nav {
    position: fixed;
    top: 76px;
    left: 1rem;
    right: 1rem;
    z-index: 110;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0.45rem;
    background: rgba(0, 0, 0, 0.96);
    border: 1px solid rgba(255, 204, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .navbar.is-open nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .navbar nav a {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 0.875rem;
    padding: 1rem 0.9rem 0.8rem;
    text-align: left;
  }

  .navbar nav a::before {
    left: 0.9rem;
    right: 0.9rem;
  }

  main#gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    grid-column: span 1 !important;
    aspect-ratio: 4 / 3 !important;
  }

  .card:nth-child(6n + 1),
  .card:nth-child(6n + 4) {
    grid-column: span 2 !important;
    aspect-ratio: 16 / 9 !important;
  }

  .card-info {
    opacity: 1;
    transform: none;
    padding: 3rem 1rem 0.9rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0));
  }

  .card-info h3 {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.2;
    text-wrap: balance;
  }

  .card-info span {
    font-size: 0.875rem;
    line-height: 1.25;
  }

  #viewer {
    justify-content: flex-start;
    padding: 4.75rem 0 1rem;
  }

  #viewer-inner {
    width: 100%;
    max-width: 100vw;
    max-height: none;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
  }

  #viewer-content {
    width: 100%;
    max-width: 100%;
    max-height: none;
  }

  #viewer-content video,
  #viewer-content img {
    width: 100%;
    max-height: 54vh;
    object-fit: contain;
    box-shadow: none;
  }

  #viewer-info {
    flex: 0 1 auto;
    width: 100%;
    max-height: 30vh;
    font-size: 1rem;
  }

  #viewer-info strong,
  .tag-line {
    margin-bottom: 0.75rem;
  }

  #close {
    top: 12px;
    right: 14px;
    width: 48px;
    height: 48px;
    font-size: 3rem;
    text-align: center;
  }

  .about-container {
    display: flex;
    flex-direction: column;
    min-height: auto;
    overflow: visible;
  }

  .about-right {
    position: relative;
    order: -1;
    width: 100%;
    height: 48vh;
    min-height: 320px;
    max-height: 520px;
    mask-image: linear-gradient(to bottom, black 62%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 62%, transparent 100%);
  }

  .portrait-img {
    height: 100%;
    transform: scale(1.12);
    object-position: 70% center;
  }

  .about-left {
    width: 100%;
    padding: 1.5rem 1.25rem 2rem;
    justify-content: flex-start;
  }

  .about-title {
    font-size: 1rem;
    line-height: 1.25;
    text-wrap: balance;
  }

  .about-text {
    max-width: 65ch;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.76);
  }

  .about-circular-img {
    width: 168px;
    height: 168px;
  }

  .software-icons {
    gap: 0.75rem;
  }

  .software-icons img {
    width: 40px;
    height: 40px;
  }

  .reel-container {
    align-items: flex-start;
    min-height: calc(100vh - 76px);
    padding: 2rem 1rem;
  }

  .video-wrapper {
    border-radius: 4px;
  }

  .contact-container {
    flex-direction: column;
    align-items: stretch;
    min-height: calc(100vh - 76px);
    gap: 1.6rem;
    padding: 2rem 1.25rem;
  }

  .contact-col {
    max-width: none;
    width: 100%;
    min-height: 44px;
  }

  .contact-col p,
  .contact-col p.sub-text {
    font-size: 0.9rem;
  }

  .contact-divider {
    width: 100%;
    height: 1px;
  }
}

@media (max-width: 520px) {
  .logo h1 {
    font-size: 0.92rem;
    letter-spacing: 0.28em;
  }

  main#gallery {
    grid-template-columns: 1fr;
  }

  .card,
  .card:nth-child(6n + 1),
  .card:nth-child(6n + 4) {
    grid-column: span 1 !important;
    aspect-ratio: 16 / 10 !important;
  }
}

@media (max-width: 380px) {
  .logo h1 {
    font-size: 0.86rem;
    letter-spacing: 0.18em;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
  }
}

@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;
  }
}
