/* ========================================
   Josh Brandon — Portfolio
   ======================================== */

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

:root {
  --bg:       #0d0d14;
  --bg-alt:   #111118;
  --surface:  rgba(255,255,255,0.05);
  --border:   rgba(255,255,255,0.08);
  --text:     #f0f0ee;
  --text-muted: #8888a0;
  --text-dim: #44445a;
  --gold:     #f5c518;
  --gold-dim: rgba(245,197,24,0.15);
  --pink:     #ff2d95;
  --green-dark: #2bcc0f;
  --reddit:   #FF4500;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: 0.3s ease;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }

/* Noise overlay */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1000; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  display: inline-block; padding: 0.9rem 2.2rem;
  background: var(--gold); color: #0a0a0f;
  font-family: var(--font-display); font-size: 0.8rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  border: none; border-radius: 3px; cursor: pointer;
  transition: all var(--ease);
  box-shadow: 0 4px 20px rgba(245,197,24,0.25);
}
.btn-primary:hover { color: #0a0a0f; transform: translateY(-2px); box-shadow: 0 6px 32px rgba(245,197,24,0.5); }
.btn-primary.small { padding: 0.65rem 1.5rem; font-size: 0.75rem; }
.btn-primary.pink { background: var(--pink); color: white; box-shadow: 0 4px 20px rgba(255,45,149,0.25); }
.btn-primary.pink:hover { color: white; box-shadow: 0 6px 28px rgba(255,45,149,0.45); }

.btn-outline {
  display: inline-block; padding: 0.9rem 2.2rem;
  background: transparent; color: var(--text);
  font-family: var(--font-display); font-size: 0.8rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  border: 1.5px solid rgba(255,255,255,0.2); border-radius: 3px;
  transition: all var(--ease); cursor: pointer;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-outline.small { padding: 0.65rem 1.5rem; font-size: 0.75rem; }

.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(13,13,20,0.9);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}
.nav.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5); }

.nav-logo {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text); position: relative;
}
.nav-logo::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--gold);
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); position: relative; transition: color var(--ease);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--gold); transition: width var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--text); transition: transform var(--ease), opacity var(--ease); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: var(--bg); flex-direction: column; align-items: center; justify-content: center;
  gap: 2.5rem; opacity: 0; pointer-events: none; transition: opacity var(--ease);
}
.mobile-menu.active { opacity: 1; pointer-events: all; }
.mobile-menu a { font-family: var(--font-display); font-weight: 800; font-size: 2rem; text-transform: uppercase; color: var(--text); }
.mobile-menu a:hover { color: var(--gold); }

/* ========================================
   HERO
   ======================================== */
.hero {
  min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: 2rem;
  padding: 7rem 4rem 5rem;
  position: relative; overflow: hidden;
}

/* Forest environment as subtle hero background texture */
.hero-texture {
  position: absolute; inset: 0;
  background-image: url('../images/Forest Scene Beauty Shot.png');
  background-size: cover; background-position: center right;
  filter: grayscale(0.4);
  opacity: 0.06;
  pointer-events: none; z-index: 0;
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--gold); margin-bottom: 0.9rem;
}

.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.92; margin-bottom: 1.2rem;
  color: var(--text); text-transform: uppercase;
}
.hero-title .highlight { color: var(--gold); }

.hero-subtitle {
  font-size: 1rem; color: var(--text-muted);
  margin-bottom: 2.5rem; line-height: 1.6;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Goddess Cat — blend makes her black bg vanish against dark page */
.hero-art {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.hero-art img {
  width: 100%; max-height: 88vh; object-fit: contain;
  filter: drop-shadow(0 0 60px rgba(245,197,24,0.2));
  transition: filter 0.6s ease;
}
.hero-art:hover img {
  filter: drop-shadow(0 0 90px rgba(245,197,24,0.38));
}

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  color: var(--text-dim);
  font-family: var(--font-display); font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  animation: hint-bounce 2.2s ease-in-out infinite;
  transition: opacity 0.5s ease; z-index: 2; pointer-events: none;
}
.scroll-hint svg { width: 16px; height: 16px; }
.scroll-hint.hidden { opacity: 0; }

@keyframes hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   SECTIONS
   ======================================== */
.section { padding: 6rem 2rem; }
.section.alt { background: var(--bg-alt); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-inner.narrow { max-width: 640px; }
.center { text-align: center; }

.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 2.5rem; text-align: center; color: var(--text);
  position: relative;
}
.section-title::after {
  content: ''; display: block; width: 44px; height: 3px;
  background: var(--gold); margin: 0.6rem auto 0;
}
.section-title.inline { display: inline; }
.section-title.inline::after { display: none; }

.section-badge {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  text-align: center; margin-bottom: 0.4rem; color: var(--gold);
}

.section-sub {
  text-align: center; color: var(--text-muted); font-size: 0.9rem;
  margin-top: -1.5rem; margin-bottom: 3rem;
}

.sub-heading {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  text-transform: uppercase; letter-spacing: 0.08em;
  text-align: center; margin: 4rem 0 2rem; color: var(--text-muted);
}

.divider { border: none; border-top: 1px solid var(--border); margin: 4rem 0; }

/* ========================================
   ART PIECES — floating, no boxes
   ======================================== */
.art-piece { position: relative; cursor: pointer; }

.art-piece img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.55));
  transition: transform 0.4s ease, filter 0.4s ease;
}
.art-piece:hover img {
  transform: scale(1.02) translateY(-4px);
  filter: drop-shadow(0 14px 40px rgba(245,197,24,0.2));
}

/* .card class kept for structure but no grey box */
.art-piece.card img { border-radius: 6px; }

/* Screenshots (game screenshots with dark backgrounds) */
.art-piece.screenshot img { border-radius: 8px; }

/* Goddess Cat in Art section — transparent PNG, no mask needed */

.art-caption {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  color: var(--text-dim); text-align: center;
  margin-top: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
}

/* Art grid */
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 3rem; margin-bottom: 1rem; }
.art-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.art-grid.three-col { grid-template-columns: repeat(3, 1fr); }

/* Project pairs — beauty + process */
.project-pair {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 3rem; align-items: start; margin-bottom: 4rem;
}
.project-pair.equal { grid-template-columns: 1fr 1fr; }
.project-solo { max-width: 700px; margin: 0 auto 4rem; }
.project-solo.compact { max-width: 480px; }
.project-solo.wide { max-width: 920px; }

/* ========================================
   GAMES — two equal 16:9 cards
   ======================================== */
.games-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: start; margin-bottom: 4rem;
}

/* 16:9 video box — equal for every game */
.game-card-video {
  position: relative; aspect-ratio: 16 / 9;
  background: #000; border-radius: 10px; overflow: hidden;
  cursor: pointer; margin-bottom: 1.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  transition: box-shadow var(--ease);
}
.game-card-video:hover { box-shadow: 0 12px 52px rgba(245,197,24,0.18); }

.game-card-video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}

.play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; background: var(--gold);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: #0a0a0f;
  box-shadow: 0 4px 24px rgba(245,197,24,0.45);
  transition: all var(--ease); pointer-events: none; z-index: 1;
}
.game-card-video:hover .play-btn { transform: translate(-50%, -50%) scale(1.1); box-shadow: 0 6px 36px rgba(245,197,24,0.7); }
.game-card-video.playing .play-btn { opacity: 0; }

.game-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--text); margin-bottom: 0.2rem;
}

.game-genre {
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 700;
  color: var(--green-dark); text-transform: uppercase;
  letter-spacing: 0.12em; margin-bottom: 0.3rem;
}

.game-credit {
  font-size: 0.68rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.game-desc {
  font-size: 0.9rem; line-height: 1.75; color: var(--text-muted); margin-bottom: 1.25rem;
}

/* Art thumbnails below game card */
.game-card-art {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-bottom: 1.25rem;
}
.game-card-art.single { grid-template-columns: 1fr; }
.game-card-art .art-piece img {
  max-height: 170px; object-fit: contain;
}

/* ========================================
   REDDIT AVATARS
   ======================================== */
.reddit-header {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.reddit-icon { width: 32px; height: 32px; flex-shrink: 0; display: block; }
.reddit-header .section-title { margin-bottom: 0; }

.avatar-trio {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem; max-width: 880px; margin: 0 auto 1rem;
}
.avatar-trio .art-piece img { border-radius: 12px; }

/* ========================================
   CTA STRIP
   ======================================== */
.cta-strip {
  padding: 4.5rem 2rem; text-align: center;
  background: linear-gradient(135deg, #13120a 0%, #0c0b14 100%);
  border-top: 1px solid rgba(245,197,24,0.15);
  border-bottom: 1px solid rgba(245,197,24,0.15);
  position: relative; overflow: hidden;
}
.cta-strip.green {
  background: linear-gradient(135deg, #0b150b 0%, #080f14 100%);
  border-top: 1px solid rgba(43,204,15,0.15);
  border-bottom: 1px solid rgba(43,204,15,0.15);
}

.cta-strip h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text); margin-bottom: 0.5rem;
}
.cta-strip p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.75rem; }
.cta-strip .btn-primary { background: var(--gold); color: #0a0a0f; }
.cta-strip .btn-primary:hover { color: #0a0a0f; }

/* ========================================
   ABOUT
   ======================================== */
.about-text { text-align: center; }
.about-text p { font-size: 1rem; line-height: 1.85; color: var(--text-muted); margin-bottom: 1.25rem; }
.about-text strong { color: var(--text); }

/* ========================================
   CONTACT
   ======================================== */
.contact-text { font-size: 1rem; color: var(--text-muted); margin-bottom: 2rem; text-align: center; }
.contact-links { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }

.contact-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  color: var(--text-muted);
  transition: all var(--ease);
}
.contact-icon-btn:hover {
  border-color: var(--gold); color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(245,197,24,0.2);
}
.contact-icon-btn svg { width: 26px; height: 26px; fill: currentColor; }

/* ========================================
   FOOTER
   ======================================== */
.footer {
  text-align: center; padding: 2rem;
  background: #080810;
  border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-dim);
}

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.97); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--ease); cursor: pointer;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: 2rem; color: white; background: none; border: none; cursor: pointer; line-height: 1;
}

/* Scroll animations removed — content always visible */

/* ========================================
   TILT & INVERT UTILITIES
   ======================================== */
.tilt-l img { transform: rotate(-2.5deg); }
.tilt-r img { transform: rotate(2deg); }
.tilt-l:hover img { transform: rotate(-2.5deg) scale(1.02) translateY(-4px); filter: drop-shadow(0 14px 40px rgba(245,197,24,0.2)); }
.tilt-r:hover img { transform: rotate(2deg) scale(1.02) translateY(-4px); filter: drop-shadow(0 14px 40px rgba(245,197,24,0.2)); }

/* Mushroom forest — invert black ink to white on dark bg */
.art-piece.inverted img {
  filter: invert(1) drop-shadow(0 8px 28px rgba(245,197,24,0.1));
}
.art-piece.inverted:hover img {
  filter: invert(1) drop-shadow(0 14px 40px rgba(245,197,24,0.22));
  transform: scale(1.02) translateY(-4px);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 5.5rem 2rem 3.5rem;
    text-align: center;
  }
  .hero-title { font-size: clamp(2rem, 9vw, 3.4rem); }
  .hero-art {
    order: -1;
    max-width: 260px;
    margin: 0 auto;
  }
  .hero-art img { max-height: 42vh; object-fit: contain; }
  .hero-actions { justify-content: center; }
  .scroll-hint { display: none; }
  .games-grid { grid-template-columns: 1fr; max-width: 580px; margin-left: auto; margin-right: auto; }
  .game-card { text-align: center; }
  .game-card .btn-row { justify-content: center; }
  .project-pair { grid-template-columns: 1fr; gap: 2rem; }
  .project-pair.equal { grid-template-columns: 1fr; }
  .reddit-header { flex-direction: column; gap: 0.3rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .art-grid, .art-grid.two-col, .art-grid.three-col { grid-template-columns: 1fr; }
  .avatar-trio { grid-template-columns: 1fr; max-width: 300px; }
  .section { padding: 4rem 1.5rem; }
  .contact-links { flex-direction: column; align-items: center; }
  .game-card-art { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .hero { padding: 5.5rem 1.25rem 3rem; }
  .nav { padding: 0.9rem 1.25rem; }
  .hero-actions { flex-direction: column; align-items: center; }
}
