/* Matthew J Harder — static recreation with video placeholders */

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #7a8a99;
  --accent-word: #6b7f92;
  --hero-accent: #e020a0;
  --placeholder: #141414;
  --placeholder-edge: #2a2a2a;
  --control-bar: rgba(0, 0, 0, 0.65);
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-nav: "DM Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --max-content: 1200px;
  --header-pad: clamp(1rem, 4vw, 2.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-nav);
  font-size: 15px;
  line-height: 1.5;
}


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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  left: var(--header-pad);
  top: var(--header-pad);
}

/* Home: full-bleed hero video band behind header + headline */
.hero-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(68vh, 820px);
  overflow: hidden;
}

/* Narrow viewports: hide scrollbars; shorter home hero for wider-looking video crop */
@media (max-width: 900px) {
  html,
  body {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
  }

  .page-home .hero-stack {
    min-height: min(31vh, 309px);
  }
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a0a0c;
}

.hero-video-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, rgba(55, 35, 65, 0.55), transparent 55%),
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(180, 40, 100, 0.12), transparent 50%),
    linear-gradient(165deg, #121018 0%, #0d0d12 45%, #18141c 100%);
}

.hero-video-fallback::after {
  content: "videos.matthewjharder.com/HeroBanner.mp4";
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  pointer-events: none;
  text-align: center;
  max-width: 90%;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video.hero-video--missing {
  display: none;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.42) 40%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem) var(--header-pad) clamp(2rem, 5vw, 3.5rem);
}

.page-home .hero-line2 {
  color: var(--hero-accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: var(--header-pad);
  background: var(--bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header.site-header--over-video {
  position: relative;
  z-index: 3;
  background: transparent;
  border-bottom: none;
}

.nav-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  justify-self: start;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  justify-self: end;
}

.nav-link {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-link:hover {
  color: var(--muted);
}

.nav-link[aria-current="page"] {
  border-bottom-color: var(--text);
}

.brand {
  justify-self: center;
  grid-column: 2;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  letter-spacing: 0.08em;
  text-align: center;
  line-height: 1;
}

.brand:hover {
  opacity: 0.85;
}

.btn-outline {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--text);
  transition: background 0.2s, color 0.2s;
}

.btn-outline:hover {
  background: var(--text);
  color: var(--bg);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--text);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: rgba(0, 0, 0, 0.97);
  padding: 2rem;
}

.mobile-overlay.is-open {
  display: flex;
}

.mobile-overlay nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-overlay .nav-link {
  font-size: 1rem;
}

@media (max-width: 900px) {
  .site-header .nav-left {
    display: none;
  }

  .header-actions .btn-outline {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .header-actions {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .brand {
    grid-column: 2;
    justify-self: center;
  }

  body.menu-open {
    overflow: hidden;
  }
}

main {
  padding: 0 var(--header-pad) clamp(3rem, 8vw, 5rem);
}

.page-home main {
  padding-top: clamp(2rem, 5vw, 3rem);
}

.hero-headline {
  margin: 0;
  max-width: var(--max-content);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-line1 {
  display: block;
  color: var(--text);
}

.hero-line2 {
  display: block;
  margin-top: 0.15em;
  min-height: 1.1em;
}

/* Rotating word colors match matthewjharder.com (Squarespace custom CSS) */
.hero-line2 #rotating-word {
  color: #00abe9;
  transition: color 0.35s ease;
}

/* Full-width reel strip */
.video-feature {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
}

/* Spacing between reel strip and the grid below */
.video-feature + .video-grid {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

/* Individual grid tile — no max-width or margin hacks; layout comes from grid gap */
.video-tile {
  width: 100%;
  min-width: 0;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--placeholder);
  border: 1px solid var(--placeholder-edge);
  overflow: hidden;
}

.video-frame video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(40, 45, 55, 0.5), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%);
  pointer-events: none;
}

.video-frame:has(video) {
  background: #0a0a0a;
}

.video-frame:has(video)::before {
  display: none;
}

.video-placeholder-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--control-bar);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.85);
}

.video-controls button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.video-controls-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.video-seek {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 100%;
  height: 3px;
  margin-bottom: 0.35rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1px;
}

.video-seek::after {
  content: "";
  display: block;
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 1px;
}

.center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(3rem, 8vw, 4.5rem);
  height: clamp(3rem, 8vw, 4.5rem);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.center-play svg {
  width: 40%;
  height: 40%;
  margin-left: 4%;
}

.video-caption {
  margin: 0.65rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.video-caption .arrow {
  margin-left: 0.15em;
}

/* Scroll-reveal (home portfolio captions); class added in main.js */
body.page-home.scroll-caption-reveal .video-caption {
  opacity: 0;
  transform: translate3d(0, clamp(1.5rem, 4vw, 2.25rem), 0) scale(0.96);
  filter: blur(10px);
  transition:
    opacity 1.45s cubic-bezier(0.16, 0.84, 0.32, 1),
    transform 1.45s cubic-bezier(0.16, 0.84, 0.32, 1),
    filter 1.45s cubic-bezier(0.16, 0.84, 0.32, 1);
}

body.page-home.scroll-caption-reveal .video-caption.is-inview {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  body.page-home.scroll-caption-reveal .video-caption {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* Reel caption centered so it reads as belonging to the full-width strip, not the left grid column */
.video-feature .video-caption {
  text-align: center;
}

/* Grid */
.video-grid {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
  padding-bottom: 2rem;
}

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

/* About page — tall portrait left, landscape + copy right (matthewjharder.com/about-me) */
.page-about .about-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.25rem);
  align-items: stretch;
}

@media (max-width: 900px) {
  .page-about .about-layout {
    grid-template-columns: 1fr;
  }
}

.about-tall {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  min-width: 0;
}

.about-photo {
  background: linear-gradient(145deg, #1c1c24, #0d0d12);
  border: 1px solid var(--placeholder-edge);
  position: relative;
  overflow: hidden;
}

.about-photo::after {
  content: "Photo placeholder";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

.about-photo:has(img)::after {
  content: none;
}

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

/* Left: fill column height; portrait crop of landscape source */
.about-photo--tall {
  flex: 1 1 auto;
  width: 100%;
  min-height: clamp(22rem, 62vh, 44rem);
}

.about-photo--tall img {
  object-position: center 28%;
}

@media (min-width: 901px) {
  .about-tall {
    min-height: 100%;
  }

  .about-photo--tall {
    flex: 1;
    min-height: 0;
    height: 100%;
  }
}

/* Right: fixed landscape frame above text */
.about-photo--inline {
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 1000 / 755;
}

.about-photo--inline img {
  object-position: center center;
}

.about-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
}

.about-text p {
  margin: 0 0 1.25rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Contact */
.page-contact .contact-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 0;
}

.page-contact h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 2rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  font-family: var(--font-nav);
  font-size: 1rem;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(255, 255, 255, 0.45);
  outline: none;
}

.btn-submit {
  margin-top: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s;
}

.btn-submit:hover {
  opacity: 0.9;
}

