/* ============================================================
   JOSH BROOKS — GAME DEV PORTFOLIO
   Shared stylesheet — all pages import this
   ============================================================ */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── TOKENS ── */
:root {
  --bg:           #6b7280;
  --bg-dark:      #23272f;
  --bg-darker:    #1a1e26;
  --surface:      #23272f;
  --surface2:     #2a2f3a;
  --cyan:         #22d3ee;
  --cyan-dim:     #0e7490;
  --cyan-glow:    rgba(34,211,238,0.12);
  --red:          #840005;
  --red-bright:   #E32132;
  --white:        #ffffff;
  --offwhite:     #e8e6df;
  --muted:        rgba(255,255,255,0.45);
  --border:       rgba(34,211,238,0.18);
  --radius:       14px;
  --radius-sm:    8px;
  --font-head:    'Montserrat', sans-serif;
  --font-body:    'Montserrat', sans-serif;
  --font-mono:    'Space Mono', monospace;
}

/* ── BASE ── */
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── NAV ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(35,35,45,0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
  padding: 6px 0;
}
}
.nav-logo-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.85;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--offwhite);
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--offwhite);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-hamburger span { background: #E32132; }
.nav-links a:hover, .nav-links a.active { color: #E32132; border-bottom-color: #E32132; }

/* ── MOBILE NAV ── */
@media (max-width: 768px) {
  .site-nav { padding: 0 20px; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: block;
    padding: 12px 24px;
    font-size: 11px;
  }
}

/* ── FOOTER ── */
.site-footer {
  margin-top: auto;
  background: var(--bg-darker);
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--cyan); }

/* ── SECTION WRAPPER ── */
.section {
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.8;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 42px);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}
.section-rule {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  margin-bottom: 40px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 40px;
  border: 1.5px solid var(--cyan);
  color: var(--red);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:hover {
  background: rgba(34,211,238,0.1);
  color: var(--cyan);
  box-shadow: 0 0 20px rgba(34,211,238,0.2);
}
.btn-solid {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.btn-solid:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: var(--white);
  box-shadow: 0 0 20px rgba(227,33,50,0.3);
}

/* ── SCROLLER (shared across pro + personal pages) ── */
.scroller-section {
  padding: 60px 0;
  background: var(--bg);
  position: relative;
}
.scroller-section .section-label,
.scroller-section .section-title,
.scroller-section .section-rule {
  padding: 0 40px;
}

:root {
  --card-w:   300px;
  --card-h:   460px;
  --media-h:  185px;
  --gap:      20px;
  --fade-w:   60px;
}

.scroller-wrap { position: relative; width: 100%; }
.scroller-wrap::before,
.scroller-wrap::after {
  content: '';
  position: absolute; top:0; bottom:0;
  width: var(--fade-w);
  z-index: 10; pointer-events: none;
  transition: width 0.2s ease;
}
.scroller-wrap::before { left:0;  background: linear-gradient(to right, var(--bg), transparent); }
.scroller-wrap::after  { right:0; background: linear-gradient(to left,  var(--bg), transparent); }

.track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 28px var(--fade-w) 32px;
  scrollbar-width: none; cursor: grab; user-select: none;
}
.track:active { cursor: grabbing; }
.track::-webkit-scrollbar { display: none; }

.card-scene {
  flex: 0 0 var(--card-w);
  height: var(--card-h);
  perspective: 900px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.card {
  width: 100%; height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), box-shadow 0.6s ease, border-color 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.card.tilting {
  transition: transform 0.08s linear, box-shadow 0.08s linear, border-color 0.4s ease;
}
.card:hover { border-color: rgba(34,211,238,0.6); }
.card::before {
  content: '';
  position: absolute; top:0; right:0; width:40px; height:40px;
  background: linear-gradient(225deg, var(--cyan-dim), transparent 60%);
  opacity: 0.5; z-index: 2; pointer-events: none;
  border-radius: 0 var(--radius) 0 0;
  transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }

.holo {
  position: absolute; inset: 0;
  border-radius: var(--radius);
  z-index: 20; pointer-events: none;
  opacity: 0; transition: opacity 0.35s ease;
  mix-blend-mode: screen;
}
.holo::after {
  content: ''; position: absolute; inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(ellipse 55% 40% at var(--gx,50%) var(--gy,40%), rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.05) 40%, transparent 70%);
}
.card:hover .holo { opacity: 1; }

.card-media {
  position: relative; width: 100%; height: var(--media-h);
  overflow: hidden; flex-shrink: 0;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-media img {
  width:100%; height:100%; object-fit:cover;
  filter: brightness(.85) saturate(.85);
  transition: filter 0.4s ease;
}
.card:hover .card-media img { filter: brightness(1) saturate(1); }
.card-media::after {
  content:''; position:absolute; bottom:0; left:0; right:0;
  height:55px;
  background: linear-gradient(transparent, var(--surface));
  pointer-events:none;
}
.card-media svg { width:100%; height:100%; }

.badge {
  position: absolute; top:10px; left:10px; z-index:3;
  font-family: var(--font-mono); font-size:9px; letter-spacing:2px; text-transform:uppercase;
  padding:3px 8px; border-radius:20px;
  backdrop-filter: blur(8px);
  background: rgba(28,31,38,0.85); border:1px solid var(--border); color:var(--cyan);
}
.badge.personal { color:var(--cyan);      border-color:rgba(34,211,238,.4); }
.badge.concept  { color:#a78bfa;           border-color:rgba(167,139,250,.3); }
.badge.tutorial { color:var(--red-bright); border-color:rgba(227,33,50,.3); }
.badge.pro      { color:var(--white);      border-color:rgba(255,255,255,.2); }

.card-body { flex:1; display:flex; flex-direction:column; padding:13px 15px 15px; gap:7px; }

.tags { display:flex; flex-wrap:wrap; gap:5px; }
.tag {
  font-family: var(--font-mono); font-size:9px; letter-spacing:1.5px; text-transform:uppercase;
  padding:3px 8px; border-radius:20px;
  border:1px solid var(--border); color:var(--cyan); background:rgba(34,211,238,.06);
  text-decoration:none; display:inline-block;
  transition:background .2s, border-color .2s;
}
.tag:hover { background:rgba(34,211,238,.16); border-color:rgba(34,211,238,.6); }
.tag.r { color:var(--red-bright); border-color:rgba(227,33,50,.4); background:rgba(132,0,5,.15); }
.tag.r:hover { background:rgba(132,0,5,.28); border-color:rgba(227,33,50,.7); }
.tag.p { color:#a78bfa; border-color:rgba(167,139,250,.3); background:rgba(167,139,250,.08); }
.tag.p:hover { background:rgba(167,139,250,.18); border-color:rgba(167,139,250,.6); }
.tag.g { color:#4ade80; border-color:rgba(74,222,128,.3); background:rgba(74,222,128,.08); }
.tag.g:hover { background:rgba(74,222,128,.18); }

.card-title {
  font-family: var(--font-head); font-weight:600; font-size:13px;
  line-height:1.4; color:var(--white); letter-spacing:0.3px; margin-top:2px;
}
.card-desc {
  font-family: var(--font-body); font-weight:300; font-size:11.5px;
  color:rgba(255,255,255,.55); line-height:1.6; flex:1;
}
.card-footer {
  display:flex; justify-content:space-between; align-items:center;
  padding-top:10px; border-top:1px solid rgba(34,211,238,.12); margin-top:6px;
}
.card-year { font-family:var(--font-mono); font-size:9px; color:var(--muted); letter-spacing:2px; }
.card-cta {
  font-family:var(--font-head); font-weight:600; font-size:10px;
  letter-spacing:2px; text-transform:uppercase;
  color:var(--red-bright); text-decoration:none;
  display:flex; align-items:center; gap:5px; opacity:.7;
  transition:opacity .2s, gap .2s, color .2s;
}
.card-cta:hover { color:var(--cyan); opacity:1; gap:9px; }

.scroller-nav {
  display:flex; justify-content:center; align-items:center;
  gap:14px; padding:4px 0 12px;
}
.s-btn {
  width:38px; height:38px; border-radius:50%;
  border:1px solid var(--border); background:var(--surface); color:var(--cyan);
  font-size:15px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background .2s, transform .15s, border-color .2s;
}
.s-btn:hover { background:rgba(34,211,238,.1); border-color:rgba(34,211,238,.5); transform:scale(1.08); }
.s-btn:active { transform:scale(.94); }
.s-dots { display:flex; gap:7px; align-items:center; }
.s-dot {
  width:5px; height:5px; border-radius:50%; background:var(--muted);
  cursor:pointer; transition:background .3s, transform .3s; border:none; padding:0;
}
.s-dot.active { background:var(--cyan); transform:scale(1.5); }

/* ── VIEW ALL TOGGLE + DENSE GRID ── */
.view-all-wrap { display:flex; justify-content:center; padding:0 40px 8px; }
.view-all-btn { position:relative; }
.view-all-btn .vab-icon { display:inline-block; transition:transform 0.25s ease; }
.view-all-btn.active .vab-icon { transform:rotate(180deg); }

.grid-view {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.22,1,0.36,1), opacity 0.4s ease, padding 0.4s ease;
}
.grid-view.open {
  max-height: 6000px;
  opacity: 1;
  padding: 8px 40px 48px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.card-grid .card-scene { height:auto; flex:none; width:auto; }
.card-grid .card { height:auto; min-height:420px; }

/* ── MOBILE SCROLLER ── */
@media (pointer: coarse) and (max-width: 600px) {
  :root { --card-w:calc(100vw - 32px); --card-h:auto; --media-h:200px; }
  .scroller-wrap::before,.scroller-wrap::after { display:none; }
  .track { flex-direction:column; overflow-x:visible; scroll-snap-type:none; padding:16px; cursor:default; }
  .card-scene { flex:none; width:100%; height:auto; }
  .card { height:auto; transform:none !important; }
  .holo { display:none; }
  .scroller-nav { display:none; }
  /* the vertically-stacked scroller already shows every card on mobile */
  .view-all-wrap { display:none; }
}

@media (max-width: 768px) {
  .section { padding:60px 20px; }
  .site-footer { padding:24px 20px; flex-direction:column; align-items:flex-start; }
  .scroller-section .section-label,
  .scroller-section .section-title,
  .scroller-section .section-rule { padding:0 20px; }
}
