@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;500;600;700;800&display=swap');

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

/* ===== BASE ===== */
html, body {
  height: 100%;
  font-family: "Inter", system-ui, sans-serif;
  background: #f5f6f4;
  color: #222;
}

/* ===== CONTAINER ===== */
.container {
  position: relative;
  height: 100%;
  overflow: hidden;
}

/* ===== HERO ===== */
.hero {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 400;
  animation: breathe 8s ease-in-out infinite;
  cursor: pointer;
}

.role {
  margin-top: 0.6rem;
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.7;
}

/* ===== CATEGORY FIELD ===== */
.categories {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  opacity: 0.35;
  animation: drift 30s ease-in-out infinite alternate;
  transition: opacity 1.2s ease, transform 6s ease;
}

.node:hover {
  opacity: 1;
  transform: scale(1.05);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #222;
  opacity: 0.6;
}

.label {
  font-size: 1.1rem;
  white-space: nowrap;
}

/* ===== CONTACT ===== */
.contact {
  position: absolute;
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  opacity: 0.5;
  z-index: 10;
}
/* FORCE contact link to behave like node */
#contact-email {
  color: inherit;
  text-decoration: none !important;
}

#contact-email:visited {
  color: inherit;
}

#contact-email:hover {
  text-decoration: none;
}
/* ===== OVERLAYS (BASE) ===== */
.overlay,
.picture-overlay {
  position: fixed;
  inset: 0;
  background: rgba(245, 246, 244, 0.95);
  z-index: 20;
  display: flex;
}

.overlay {
  align-items: center;
  justify-content: center;
}

.picture-overlay {
  align-items: center;
}

.overlay.hidden,
.picture-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== OVERLAY CONTENT ===== */
.overlay-content {
  max-width: 420px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.6;
}

.close,
.picture-close {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
}

.picture-close {
  position: absolute;
  top: 3%;
  right: 4%;
  font-size: 2rem;
}

.close:hover,
.picture-close:hover {
  opacity: 1;
}

/* ===== PICTURE TRACK ===== */
.picture-track {
  display: flex;
  gap: 6vw;
  padding: 0 8vw;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.picture-track::-webkit-scrollbar {
  height: 10px;
}

.picture-track::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.25);
  border-radius: 3px;
}

.picture-track::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== PICTURE ITEMS (LINEAR / REDESIGN DEFAULT) ===== */
.picture-item {
  flex: 0 0 70vw;
  height: 42vh;
  background: #e3e3e3;
  display: flex;
  align-items: center;
  gap: 4vw;
  scroll-snap-align: center;
  font-size: 0.9rem;
}

/* ===== TEXT + VIDEO ===== */
.project-text {
  flex: 0 0 32%;
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0.85;
  max-height: 100%;
  overflow-y: auto;
  pointer-events: none;
}

.project-text .rights {
  margin-top: 1rem;
  font-size: 0.75rem;
  opacity: 0.5;
}

.project-video {
  flex: 1;
  aspect-ratio: 16 / 9;
}

.project-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================================
   NON-LINEAR OVERLAY — CORRECT FIX
========================================================= */

/* KEEP overlay centered vertically */
#nonlinear-overlay {
  align-items: center;   /* <-- THIS is the fix */
}

/* Track should align items at top */
#nonlinear-overlay .picture-track {
  align-items: flex-start;
}

/* Each project card */
#nonlinear-overlay .picture-item {
  flex: 1;
  min-width: 0;
  height: auto;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Thumbnail size */
#nonlinear-overlay .picture-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
/* ===== MUSIC OVERLAY ===== */
#music-overlay .picture-item {
  height: auto;
  align-items: flex-start;
}

#music-overlay iframe {
  height: 450px;
}



/* ===== ANIMATIONS ===== */
@keyframes breathe {
  0% { opacity: 0.75; letter-spacing: 0.02em; }
  50% { opacity: 1; letter-spacing: 0.12em; }
  100% { opacity: 0.75; letter-spacing: 0.02em; }
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-14px); }
}
/* =========================================================
   NON-LINEAR OVERLAY — FINAL ALIGNMENT FIX
========================================================= */

#nonlinear-overlay {
  align-items: flex-start;
  padding-top: 12vh;
}
/* Re-enable links inside project text */
.project-text a {
  pointer-events: auto;
}
.project-text a {
  color: inherit;
  text-decoration: underline;
  opacity: 0.7;
}

.project-text a:hover {
  opacity: 1;
}
/* === CLICKABLE THUMB HINT === */
.picture-thumb img {
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.picture-thumb:hover img {
  opacity: 1;
}
/* ===== FEATURED PICTURE WORK ===== */
#picture-overlay .picture-item:nth-child(6) {
  order: -1;
}
/* ===== RITUAL SCI-FI VISUAL SYSTEM ===== */
:root {
  --void: #0b0d10;
  --smoke: #171a20;
  --bone: #e7e0d5;
  --acid: #c7ff3d;
  --blood: #b61f36;
  --violet: #8b7cff;
}
html, body {
  background: radial-gradient(circle at 50% 12%, #202636 0%, var(--void) 46%, #07080a 100%);
  color: var(--bone);
  font-family: "Space Mono", monospace;
}
.hero h1 {
  color: var(--bone);
  font-family: "Syne", sans-serif;
  font-size: clamp(2.6rem, 6vw, 5.25rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(139, 124, 255, 0.32);
}
.role {
  color: var(--acid);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  line-height: 1.6;
  opacity: 0.95;
  text-transform: uppercase;
}
.node {
  color: var(--bone);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  opacity: 0.62;
  text-transform: uppercase;
}
.node:hover {
  color: var(--acid);
  text-shadow: 0 0 18px rgba(199, 255, 61, 0.55);
}
.dot {
  background: var(--acid);
  box-shadow: 0 0 12px rgba(199, 255, 61, 0.9);
  opacity: 1;
}
.contact {
  color: var(--violet);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  opacity: 0.9;
  text-transform: uppercase;
}
.overlay,
.picture-overlay {
  background: rgba(11, 13, 16, 0.96);
  backdrop-filter: blur(16px);
}
.overlay-content {
  color: var(--bone);
  font-family: "Syne", sans-serif;
  font-size: 1.25rem;
}
.close,
.picture-close {
  color: var(--acid);
}
.picture-track::-webkit-scrollbar-thumb {
  background: var(--acid);
  box-shadow: 0 0 12px rgba(199, 255, 61, 0.65);
}
.picture-item {
  background: linear-gradient(135deg, rgba(31, 35, 45, 0.96), rgba(12, 14, 18, 0.96));
  border: 1px solid rgba(231, 224, 213, 0.14);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(199, 255, 61, 0.08);
}
.project-text {
  color: var(--bone);
  font-family: "Space Mono", monospace;
}
.project-title,
.project-text strong {
  color: var(--acid);
  font-family: "Syne", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.project-text .rights {
  color: var(--violet);
  opacity: 0.85;
}
.project-text a {
  color: var(--acid);
}
#nonlinear-overlay .picture-item {
  border: 0;
  box-shadow: none;
}
/* ===== STABLE HORIZONTAL BREATHING ===== */
.hero {
  width: 100%;
  padding: 0 1rem;
}
.hero h1 {
  font-size: clamp(1.65rem, 6vw, 5.25rem);
  letter-spacing: 0.04em;
  transform-origin: center;
  white-space: nowrap;
}
@keyframes breathe {
  0%, 100% {
    opacity: 0.78;
    letter-spacing: 0.03em;
    transform: scaleX(0.985);
  }
  50% {
    opacity: 1;
    letter-spacing: 0.065em;
    transform: scaleX(1);
  }
}

/* ===== JOHN RYDER PRODUCTIONS — NIGHT HIGHWAY IDENT ===== */
:root {
  --road: #090b0e;
  --road-deep: #11161c;
  --headlight: #edf3f2;
  --steel: #aebac0;
  --signal-blue: #74aeca;
  --tail-light: #bd392f;
}

html, body {
  background:
    radial-gradient(ellipse at 50% 11%, rgba(116, 174, 202, 0.12), transparent 33%),
    linear-gradient(135deg, var(--road) 0%, var(--road-deep) 52%, #080a0c 100%);
  color: var(--headlight);
  font-family: "Share Tech Mono", "Space Mono", monospace;
}

.container::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(174, 186, 192, 0.04) 4px);
  z-index: 0;
}

.hero h1 {
  font-family: "Barlow Condensed", "Syne", sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--headlight);
  text-shadow: 0 0 20px rgba(116, 174, 202, 0.22);
}

.wordmark-main, .wordmark-sub { display: block; }
.wordmark-main { font-size: clamp(2.7rem, 7vw, 7rem); line-height: 0.78; }
.wordmark-sub {
  margin-top: 0.68rem;
  font-family: "Share Tech Mono", monospace;
  font-size: clamp(0.56rem, 1.1vw, 0.92rem);
  font-weight: 400;
  letter-spacing: 0.55em;
  color: var(--signal-blue);
  line-height: 1;
}

.role {
  margin-top: 1.15rem;
  color: var(--steel);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(116, 174, 202, 0.16);
}

.node {
  color: var(--steel);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(116, 174, 202, 0.14);
}
.node:hover { color: var(--headlight); text-shadow: 0 0 18px rgba(116, 174, 202, 0.55); }
.dot { background: var(--tail-light); box-shadow: 0 0 11px rgba(189, 57, 47, 0.7); }

.contact, .contact a { color: var(--signal-blue); letter-spacing: 0.14em; }
.overlay, .picture-overlay { background: rgba(7, 9, 12, 0.96); backdrop-filter: blur(9px); }
.overlay-content, .picture-item { border-color: rgba(116, 174, 202, 0.3); }
.picture-item { background: linear-gradient(145deg, rgba(20, 26, 32, 0.88), rgba(8, 10, 13, 0.9)); }
.project-title, .project-text strong, .overlay-content { color: var(--headlight); }
.rights, .project-meta, .project-role { color: var(--steel); }
.close, .picture-close { color: var(--signal-blue); }

.ryder-mark {
  width: 74px !important;
  opacity: 0.92 !important;
  filter: drop-shadow(0 0 12px rgba(116, 174, 202, 0.52));
}
.site-credit {
  color: var(--steel);
  font-family: "Share Tech Mono", monospace !important;
  letter-spacing: 0.12em !important;
}

@media (max-width: 600px) {
  .wordmark-main { font-size: clamp(2.25rem, 12vw, 4.25rem); }
  .wordmark-sub { letter-spacing: 0.34em; }
  .role { font-size: 0.54rem; letter-spacing: 0.13em; }
  .ryder-mark { width: 52px !important; }
}
/* Match overlay sliders to the node signal lights */
.picture-track::-webkit-scrollbar-thumb {
  background: var(--tail-light);
  box-shadow: 0 0 12px rgba(189, 57, 47, 0.65);
}
/* Larger John Ryder Productions wordmark */
.ryder-mark { width: 148px !important; }
@media (max-width: 600px) { .ryder-mark { width: 104px !important; } }
/* Contact uses the same signal response as the portfolio nodes. */
#contact-email {
  display: inline-flex;
  align-items: center;
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
#contact-email .dot {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
#contact-email:hover {
  color: var(--headlight);
  text-shadow: 0 0 18px rgba(116, 174, 202, 0.55);
}
#contact-email:hover .dot {
  transform: scale(1.55);
  box-shadow: 0 0 18px rgba(189, 57, 47, 1);
}
