/* ==========================================================================
   RESET / BASE
   ========================================================================== */

:root {
  --bg:            #000000;
  --ink:           #ffffff;
  --ink-soft:      rgba(255, 255, 255, 0.55);
  --line:          rgba(255, 255, 255, 0.16);
  --accent:        #c14a2a;
  --hover-blue:    #2f6fed;

  --header-h:      64px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

ol, ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  z-index: 60;
  pointer-events: none;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
  pointer-events: none;
  z-index: -1;
}

.menu-toggle,
.about-toggle {
  pointer-events: auto;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 20px;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.about-toggle {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  text-transform: lowercase;
  color: var(--ink);
  transition: color 0.25s var(--ease);
}

.about-toggle:hover {
  color: var(--hover-blue);
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  height: 100vh;
}

.hero-stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  perspective: 1100px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-name-wrap {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.3s var(--ease), transform 1.3s var(--ease);
}

.hero-name-wrap.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-name-tilt {
  position: relative;
  pointer-events: auto;
  display: inline-block;
  will-change: transform;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.hero-name {
  position: relative;
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(36px, 8.1vw, 115px);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  white-space: nowrap;
  color: var(--ink);
  filter: blur(3.5px);
}

.hero-name::before,
.hero-name::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-name::before {
  color: #ff2b4d;
  mix-blend-mode: screen;
  transform: translate(-0.6px, 0.2px);
  opacity: 0.35;
}

.hero-name::after {
  color: #00d8ff;
  mix-blend-mode: screen;
  transform: translate(0.6px, -0.2px);
  opacity: 0.35;
}

.hero-name-sharp {
  position: absolute;
  inset: 0;
  filter: blur(0.6px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  -webkit-mask-image: radial-gradient(circle 130px at var(--mx, 50%) var(--my, 50%), black 0%, black 35%, transparent 72%);
  mask-image: radial-gradient(circle 130px at var(--mx, 50%) var(--my, 50%), black 0%, black 35%, transparent 72%);
}

.hero-name-sharp.is-visible {
  opacity: 1;
}

.hero-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity 1.3s var(--ease) 0.4s;
}

.hero-scroll-hint.is-visible {
  opacity: 1;
}

/* ==========================================================================
   SELECTED WORK — GRID
   ========================================================================== */

.work {
  padding: 0 clamp(16px, 3vw, 32px) 120px;
}

.work-heading {
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--ink-soft);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.work-item {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  background: #111;
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.work-item:hover img,
.work-item:focus-visible img {
  transform: scale(1.04);
}

.work-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.work-item:hover .work-item-overlay,
.work-item:focus-visible .work-item-overlay {
  opacity: 1;
}

.work-item-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.work-item.no-image img {
  display: none;
}

.work-item.no-image .work-item-overlay {
  opacity: 1;
  background: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.work-item.no-image .work-item-title {
  opacity: 0.6;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  padding: 0 clamp(20px, 4vw, 48px) 40px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-links a {
  display: flex;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}

.social-links a:hover {
  color: var(--ink);
}

.social-links svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   PROJECT DRAWER
   ========================================================================== */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: min(86vw, 340px);
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 96px 28px 40px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.45s var(--ease);
}

.drawer.is-open {
  pointer-events: auto;
}

.drawer.is-open .drawer-backdrop {
  opacity: 1;
}

.drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-panel ol::-webkit-scrollbar {
  display: none;
}

.project-group-label {
  display: block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.9;
  color: var(--ink);
  opacity: 0.4;
  margin-top: 18px;
}

.project-group-label:first-child {
  margin-top: 0;
}

.project-item-link {
  display: block;
  cursor: pointer;
}

.project-item-title {
  display: block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-transform: lowercase;
  line-height: 1.9;
  color: var(--ink);
  transition: color 0.25s var(--ease);
}

.project-item.is-active .project-item-title,
.project-item:hover .project-item-title {
  color: var(--hover-blue);
}

/* ==========================================================================
   ABOUT OVERLAY
   ========================================================================== */

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.about-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.about-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.about-overlay-frame {
  position: relative;
  width: min(90vw, 480px);
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  transform: translateY(6px);
  transition: transform 0.35s var(--ease);
}

.about-overlay.is-open .about-overlay-frame {
  transform: translateY(0);
}

.about-overlay-body {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.about-overlay-photo {
  flex: 0 0 auto;
  width: 108px;
  height: 108px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #16161a;
}

.about-overlay-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-overlay-photo.no-image img {
  display: none;
}

.about-overlay-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.about-overlay-bio {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink);
}

.about-overlay-contact-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-overlay-label {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 10.5px;
  text-transform: lowercase;
  color: var(--ink-soft);
}

.about-overlay-contact {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}

.about-overlay-contact:hover {
  color: var(--ink);
}

.about-overlay-close {
  position: absolute;
  top: -28px;
  right: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  text-transform: lowercase;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}

.about-overlay-close:hover {
  color: var(--ink);
}

/* ==========================================================================
   VIDEO OVERLAY
   ========================================================================== */

.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}

.video-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.video-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
}

.video-overlay-frame {
  position: relative;
  width: min(86vw, 1400px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: scale(0.97);
  transition: transform 0.45s var(--ease);
}

.video-overlay.is-open .video-overlay-frame {
  transform: scale(1);
}

.video-overlay-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  background: #000;
}

.video-overlay-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-overlay-placeholder[hidden] {
  display: none;
}

.video-overlay-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  text-transform: lowercase;
  color: rgba(244, 242, 238, 0.5);
}

.video-overlay-caption {
  display: flex;
  justify-content: space-between;
  color: #f4f2ee;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#video-overlay-title {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  text-transform: lowercase;
}

.video-overlay-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #f4f2ee;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.25s var(--ease);
}

.video-overlay-close:hover {
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (max-width: 600px) {
  /* the same blur radius reads much heavier against the smaller mobile
     type size, so ease it off here */
  .hero-name {
    filter: blur(2px);
  }

  .hero-name-sharp {
    filter: blur(0.4px);
  }
}
