/* ============================================================
   PORTFOLIO — style.css
   Aesthetic: Dark editorial · Syne display font · amber accents
   ============================================================ */

/* ── Reset & tokens ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080810;
  --bg-2:      #0f0f1a;
  --bg-3:      #161626;
  --surface:   #1a1a2e;
  --border:    rgba(255,255,255,0.08);
  --border-hi: rgba(255,255,255,0.18);

  --accent:    #f5a623;
  --accent-2:  #e8855a;
  --violet:    #a78bfa;
  --cyan:      #67e8f9;

  --text:      #f0ece8;
  --text-2:    #a09a94;
  --text-3:    #6a6460;

  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --radius:    12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* ── Custom cursor ── */
.cursor {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s, opacity 0.2s;
  opacity: 0;
}
.cursor-dot {
  position: fixed;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
}
body:hover .cursor, body:hover .cursor-dot { opacity: 1; }
body.cursor-hover .cursor {
  width: 56px; height: 56px;
  border-color: var(--violet);
  background: rgba(167,139,250,0.08);
}

/* ── Typography ── */
h1,h2,h3,h4 { font-family: var(--font-head); line-height: 1.1; }

/* ── Containers ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  transition: background var(--transition), padding var(--transition);
}
.nav.scrolled {
  background: rgba(8,8,16,0.92);
  backdrop-filter: blur(16px);
  padding: 14px 40px;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links .nav-github {
  color: var(--accent);
  border: 1px solid rgba(245,166,35,0.35);
  padding: 6px 16px;
  border-radius: 40px;
}
.nav-links .nav-github:hover {
  background: rgba(245,166,35,0.12);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#heroCanvas { width: 100%; height: 100%; display: block; }

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1px solid rgba(245,166,35,0.3);
  padding: 6px 18px;
  border-radius: 40px;
}
.hero-title {
  font-size: clamp(64px, 10vw, 130px);
  font-weight: 800;
  line-height: 0.95;
  margin-bottom: 28px;
  letter-spacing: -3px;
}
.hero-title .line { display: block; }
.hero-title .accent-line { color: var(--accent); }
.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto 40px;
  font-weight: 300;
  line-height: 1.6;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  cursor: none;
}
.btn-primary {
  background: var(--accent);
  color: #080810;
}
.btn-primary:hover {
  background: #ffc04a;
  transform: translateY(-2px);
}
.btn-ghost {
  border: 1px solid var(--border-hi);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
.hero-scroll span {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-3);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-3), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ── SECTIONS ── */
.section {
  padding: 120px 0;
}
.section--dark {
  background: var(--bg-2);
}

.section-header {
  margin-bottom: 64px;
}
.section-num {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 17px;
  color: var(--text-2);
  max-width: 520px;
  font-weight: 300;
}

/* ── REVEAL ANIMATIONS ── */
.reveal, .reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible, .reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── GAME CARDS ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: none;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hi);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.card-media {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.rps-thumb {
  background: radial-gradient(ellipse at 40% 40%, #1a0f35 0%, #06030f 70%);
}
.rps-art {
  display: flex;
  gap: 20px;
  font-size: 48px;
  animation: rpsFloat 4s ease-in-out infinite;
}
.rps-icon { animation: iconBob 3s ease-in-out infinite; }
.rps-icon:nth-child(2) { animation-delay: 0.4s; }
.rps-icon:nth-child(3) { animation-delay: 0.8s; }
@keyframes rpsFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes iconBob {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

.card-tag {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  background: rgba(245,166,35,0.15);
  color: var(--accent);
  border: 1px solid rgba(245,166,35,0.3);
  padding: 4px 12px;
  border-radius: 40px;
}

.card-body { padding: 24px; }
.card-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.card-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 300;
}
.card-links { display: flex; gap: 10px; flex-wrap: wrap; }
.link-chip {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 40px;
  text-decoration: none;
  border: 1px solid var(--border-hi);
  color: var(--text);
  transition: var(--transition);
}
.link-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.link-chip--doc {
  border-color: rgba(103,232,249,0.3);
  color: var(--cyan);
}
.link-chip--doc:hover {
  border-color: var(--cyan);
  background: rgba(103,232,249,0.08);
}

/* Add card */
.game-card--add {
  border-style: dashed;
  border-color: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  opacity: 0.5;
  transition: opacity var(--transition), border-color var(--transition);
}
.game-card--add:hover { opacity: 0.8; border-color: var(--accent); }
.add-inner {
  text-align: center;
  color: var(--text-3);
}
.add-icon {
  font-size: 40px;
  margin-bottom: 12px;
  color: var(--text-3);
}
.add-inner p { font-size: 15px; margin-bottom: 8px; }
.add-hint { font-size: 12px; color: var(--text-3); }
.add-hint code {
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
}

/* ── ART MASONRY ── */
.art-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.art-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: none;
  transition: transform var(--transition), border-color var(--transition);
}
.art-item:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.art-item--wide { grid-column: span 2; }

.art-preview {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
}
.art-item--wide .art-preview { aspect-ratio: 16/9; }
.art-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.art-item:hover .art-preview img { transform: scale(1.04); }

.rps-poster-preview { background: #0d0a20; }
.poster-svg-thumb { width: 100%; height: 100%; object-fit: contain; }

.art-preview--empty {
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius);
  flex-direction: column;
  gap: 8px;
  color: var(--text-3);
}
.upload-plus { font-size: 28px; }
.art-preview--empty p { font-size: 13px; }

figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
}
.art-name { font-size: 14px; font-weight: 500; }
.art-medium { font-size: 12px; color: var(--text-3); }

/* Upload guide */
.upload-guide {
  margin-top: 48px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 600px;
}
.upload-guide h4 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--cyan);
}
.upload-guide ol {
  padding-left: 20px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 2;
}
.upload-guide code {
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: var(--accent);
}

/* ── DOCUMENTS ── */
.docs-list { display: flex; flex-direction: column; gap: 2px; }

.doc-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
  cursor: none;
}
.doc-row:hover { border-color: var(--border-hi); background: var(--bg-3); }
.doc-row--placeholder { opacity: 0.45; cursor: default; }

.doc-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.docx-icon { background: rgba(103,232,249,0.12); color: var(--cyan); border: 1px solid rgba(103,232,249,0.25); }
.pdf-icon  { background: rgba(245,166,35,0.12);  color: var(--accent); border: 1px solid rgba(245,166,35,0.25); }

.doc-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.doc-name { font-size: 15px; font-weight: 500; }
.doc-meta { font-size: 13px; color: var(--text-3); }
.doc-meta code {
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
  color: var(--accent);
}

.doc-action {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

/* ── CAREER ── */
.career-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;
  align-items: start;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.tl-item {
  position: relative;
  margin-bottom: 52px;
}
.tl-dot {
  position: absolute;
  left: -36px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-2);
  box-shadow: 0 0 12px rgba(245,166,35,0.6);
}
.tl-date {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.tl-role {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.tl-desc { font-size: 14px; color: var(--text-2); font-weight: 300; margin-bottom: 14px; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 40px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  letter-spacing: 0.5px;
}

/* Skills */
.skills-panel {
  position: sticky;
  top: 100px;
}
.skills-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 24px;
}
.skill-bars { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.skill-bar {}
.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 6px;
}
.skill-label span:last-child { color: var(--accent); font-weight: 600; }
.skill-track {
  height: 3px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-fill.animated { width: var(--w); }

.contact-block { display: flex; flex-direction: column; gap: 10px; }
.contact-link {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--transition);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.contact-link:hover { color: var(--accent); }

/* ── FOOTER ── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
}
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 13px; color: var(--text-3); }
.footer-top {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-top:hover { color: var(--accent); }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-close {
  position: absolute;
  top: 24px; right: 28px;
  background: none;
  border: 1px solid var(--border-hi);
  color: var(--text);
  font-size: 18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-inner { max-width: 90vw; max-height: 90vh; text-align: center; }
.lightbox-inner img {
  max-width: 100%; max-height: 80vh;
  border-radius: var(--radius);
  object-fit: contain;
}
#lightboxCaption {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-2);
}

/* ── MOBILE NAV MENU ── */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(8,8,16,0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 24px; }
  .nav-toggle { display: flex; z-index: 100; }

  .hero-content { padding: 0 24px; }
  .container { padding: 0 24px; }
  .section { padding: 80px 0; }
  .nav { padding: 16px 24px; }
  .nav.scrolled { padding: 12px 24px; }

  .games-grid { grid-template-columns: 1fr; }
  .art-masonry { grid-template-columns: 1fr; }
  .art-item--wide { grid-column: span 1; }
  .career-layout { grid-template-columns: 1fr; gap: 48px; }
  .skills-panel { position: static; }

  .footer-inner { flex-direction: column; text-align: center; }

  body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
}
