/* ----------  Ed Headland — shared styles  ---------- */

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

body {
  background: #f4f2ee;
  color: #1a1a1a;
  font-family: Arial, sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Pages that should never scroll (home + work) add this class */
body.fixed {
  height: 100dvh;
  overflow: hidden;
}

/* ----------  Header / nav  ---------- */

header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 52px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-self: start;
}

/* Centred, looping pfp avatar in the title bar */
.header-center { justify-self: center; }

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #e0ddd7;
  flex-shrink: 0;
}
.avatar video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav a { text-decoration: none; color: #1a1a1a; }

/* "Ed Headland" — tightened kerning (was 1.5px) */
.nav .brand {
  font-size: 16px;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
  transition: opacity 0.15s;
}
.nav .brand:hover { opacity: 0.6; }

.nav .sub {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9a948c;
  transition: color 0.15s;
}
.nav .sub:hover { color: #1a1a1a; }
.nav a.active { color: #1a1a1a; opacity: 1; }
.nav .brand.active { font-weight: bold; }
.nav .sub.active { color: #1a1a1a; }

.contact {
  font-size: 13px;
  text-align: right;
  letter-spacing: 0.3px;
  color: #666;
  justify-self: end;
}
.contact a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.contact a:hover { color: #1a1a1a; }

/* ----------  Video player (progress bar + mute toggle)  ---------- */

.player { position: relative; overflow: hidden; }
.player video { display: block; }

.player .mute {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 6;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.15s, transform 0.15s;
}
.player:hover .mute { opacity: 1; }

/* Always show mute button on touch devices (no hover available) */
@media (hover: none) {
  .player .mute { opacity: 0.75; }
}
.player .mute:hover { background: rgba(20, 20, 20, 0.5); transform: scale(1.06); }
.player .mute svg { width: 16px; height: 16px; display: block; }

.player .progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.18);
  z-index: 6;
}
.player .progress .bar {
  height: 100%;
  width: 0%;
  background: #1a1a1a;
}

/* ----------  Home — big pfp video  ---------- */

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 28px 52px;
}
.hero .player {
  height: 100%;
  width: fit-content;
  max-width: 100%;
  border-radius: 4px;
}
.hero video {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* ----------  Work — horizontal reel  ---------- */

.reel-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.reel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 52px;
  scrollbar-width: none;
  width: 100%;
  cursor: grab;
  user-select: none;
}
.reel.dragging { cursor: grabbing; }
.reel::-webkit-scrollbar { display: none; }

.video-card {
  flex: 0 0 auto;
  width: min(74vw, 740px);
  aspect-ratio: 16 / 9;
  background: #e0ddd7;
  scroll-snap-align: center;
}
.video-card .player { width: 100%; height: 100%; }
.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.video-card video.loaded { opacity: 1; }

/* ----------  About  ---------- */

.about {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
}
.about-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 720px;
  width: 100%;
}
.about-photo {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
}
.about-photo img {
  max-width: 100%;
  max-height: 62vh;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}
.about-photo .placeholder {
  display: inline-block;
  padding: 60px 0;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9a948c;
}
.about-text {
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.2px;
  text-align: center;
  max-width: 540px;
}

/* ----------  Mobile  ---------- */

@media (max-width: 600px) {
  header { padding: 16px 24px; }
  .nav .brand { font-size: 14px; }
  .nav .sub { font-size: 11px; }
  .contact { font-size: 11px; }

  .hero { padding: 18px 24px; }
  .reel { padding: 0 24px; gap: 10px; }
  .video-card { width: 86vw; }

  .about { padding: 32px 24px; }
  .about-inner { gap: 22px; }
  .about-photo img { max-height: 48vh; }
  .about-text { font-size: 15px; }
  .avatar { width: 68px; height: 68px; }
}
