/* ==============================================
   CHROMAGRAPH — main.css
   ============================================== */

/* ── Variables ─────────────────────────────── */
:root {
  --bg-primary:    #111110;
  --bg-card:       rgba(255,255,255,0.02);
  --text-primary:  #f2f0ea;
  --text-muted:    #a09e98;
  --text-faint:    #555451;
  --border-faint:  rgba(255,255,255,0.07);
  --border-subtle: rgba(255,255,255,0.14);
  --accent-red:    #e63329;
  --accent-orange: #f5a623;
  --accent-green:  #34b27d;
  --accent-blue:   #4a90d9;
  --accent-purple: #9b59b6;
  --radius-md:     8px;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Layout ────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

main {
  flex: 1;
  padding: 56px 0 100px;
}

/* ── Header ────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border-faint);
  padding: 22px 0;
  position: sticky;
  top: 0;
  background: rgba(17,17,16,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-name {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

header nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

header nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

header nav a:hover { color: var(--text-primary); }

/* ── Footer ────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-faint);
  padding: 28px 0;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

footer .footer-copy,
footer nav a {
  font-size: 0.8rem;
  color: var(--text-faint);
}

footer nav {
  display: flex;
  gap: 20px;
}

footer nav a:hover { color: var(--text-muted); }

/* ── Hero ───────────────────────────────────── */
.hero {
  padding: 3.5rem 0 4rem;
}

.hero h1 {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero h1 .gradient-text {
  background: linear-gradient(90deg, var(--accent-red), var(--accent-orange), var(--accent-green), var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section label ──────────────────────────── */
.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-faint);
}

/* ── Game cards (homepage) ──────────────────── */
.games-list {
  display: flex;
  flex-direction: column;
  gap: 88px;
}

.game-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding: 2rem;
  border: 0.5px solid var(--border-faint);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.game-card.flip {
  direction: rtl;
}
.game-card.flip > * {
  direction: ltr;
}

.game-card-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 6px;
}

/* ── Carousel (sliding) ─────────────────────── */
.game-carousel {
  position: relative;
  width: 100%;
  padding-top: 62.5%; /* 16:10 */
  background: #0a0a09;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.carousel-track {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-slide-inner {
  position: absolute;
  inset: 0;
}

.carousel-slide-bg {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(0.35);
  transform: scale(1.15);
}

.carousel-slide-fg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide-fg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Nav buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s, background 0.15s;
}

.game-carousel:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover { background: rgba(0,0,0,0.8); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: rgba(255,255,255,0.9);
  transform: scale(1.2);
}

/* Zoom */
.carousel-zoom {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s, background 0.15s;
}

.game-carousel:hover .carousel-zoom { opacity: 1; }
.carousel-zoom:hover { background: rgba(0,0,0,0.8); }

.carousel-zoom svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Lightbox ───────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.lightbox-close:hover { color: #fff; }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.28);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  font-weight: 500;
}

.btn-primary:hover {
  background: #e5e3dd;
  border-color: #e5e3dd;
}

/* ── Tag pill ───────────────────────────────── */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid;
  width: fit-content;
}

/* ── Status badge ───────────────────────────── */
.status {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* ── Card text (shared) ─────────────────────── */
.card-title {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
}

.card-title a { transition: opacity 0.15s; }
.card-title a:hover { opacity: 0.75; }

.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.7;
}

.card-desc p + p { margin-top: 10px; }

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ── Individual item back link ──────────────── */
.single-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  transition: color 0.15s;
}

.single-back:hover { color: var(--text-primary); }

/* ── Portfolio bio section ──────────────────── */
.bio-section {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 48px;
  align-items: start;
  margin-bottom: 72px;
  padding-bottom: 64px;
}

.bio-name {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

.bio-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.bio-text {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.75;
}

.bio-text p + p { margin-top: 12px; }

.bio-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.bio-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-faint);
}

/* ── Portfolio grid (4-col thumbnails) ──────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.portfolio-thumb {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #1a1a19;
}

.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.2s;
}

.portfolio-thumb:hover img {
  transform: scale(1.03);
  opacity: 0.85;
}

.portfolio-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #1a1a19;
}

/* ── Portfolio item single (Option A) ───────── */
.portfolio-two-col {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.portfolio-sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.sidebar-row {
  padding: 12px 0;
  border-top: 1px solid var(--border-faint);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.sidebar-value {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pill {
  padding: 2px 9px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-faint);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.portfolio-description {
  padding-top: 40px;
  border-top: 1px solid var(--border-faint);
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.75;
}

.portfolio-description p + p { margin-top: 14px; }
.portfolio-description h2,
.portfolio-description h3 {
  font-family: 'Noto Sans', sans-serif;
  color: var(--text-primary);
  margin: 28px 0 10px;
}

/* ── Static content pages ───────────────────── */
.static-content {
  max-width: 680px;
}

.static-content h1 {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.025em;
  margin-bottom: 36px;
}

.static-content h2 {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 32px 0 10px;
  color: var(--text-primary);
}

.static-content p,
.static-content li {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.75;
  margin-bottom: 10px;
}

.static-content ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.static-content a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-decoration-color: rgba(74,144,217,0.4);
}

/* ── Loading / error state ──────────────────── */
.loading {
  color: var(--text-faint);
  font-size: 0.875rem;
  padding: 60px 0;
  text-align: center;
}

/* ── Responsive: 900px ──────────────────────── */
@media (max-width: 900px) {
  .game-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .game-card.flip { direction: ltr; }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-two-col {
    grid-template-columns: 1fr;
  }

  .bio-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .bio-photo {
    width: 120px;
    height: 120px;
    order: -1;
  }
}

/* ── Responsive: 640px ──────────────────────── */
@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }

  main { padding: 36px 0 72px; }

  .games-list { gap: 48px; }

  .game-card { padding: 1.25rem; gap: 1.25rem; }

  .card-title { font-size: 1.5rem; }

  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }

  .logo-name { font-size: 0.95rem; }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .bio-name { font-size: 1.6rem; }

  .portfolio-two-col { grid-template-columns: 1fr; }
}
