:root {
  --bg: #0b0c10;
  --panel: #12141a;
  --text: #e9eef5;
  --muted: #a9b4c2;
  --link: #7cc4ff;
  --border: #222634;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  position: relative;
}

/* Sketch background layer — developer notebook pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  background-image: url('images/sketch-bg.jpg');
  background-repeat: repeat;
  background-size: 1600px;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* Parallax scroll: background moves at 75% card speed */
@supports (animation-timeline: scroll()) {
  body::before {
    animation: parallax-scroll linear;
    animation-timeline: scroll();
  }
  @keyframes parallax-scroll {
    from { transform: translateY(0); }
    to { transform: translateY(-25%); }
  }
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

h1 { 
  margin: 0 0 6px 0; 
  font-size: 36px; 
}

h2 { 
  margin: 0 0 12px 0; 
  font-size: 24px; 
}

h3 {
  margin: 0;
  font-size: 22px;
}

.tagline {
  margin: 0 0 14px 0;
  color: var(--muted);
}

.links {
  margin-top: 16px;
}

.links a {
  display: inline-block;
  margin-right: 16px;
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}

.links a:hover { 
  text-decoration: underline; 
}

a, a:visited {
  color: var(--link);
}

.card {
  background: rgba(18, 20, 26, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

figure { 
  margin: 0; 
}

img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  color: var(--muted);
  padding-bottom: 48px;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

/* Team page styles */
.team-member {
  margin-top: 20px;
}

.team-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.team-header a:hover .team-photo {
  transform: scale(1.05);
  border-color: var(--link);
}

.role {
  color: var(--muted);
  font-size: 16px;
  margin: 4px 0 0 0;
}

.team-header h3 a {
  color: var(--text);
  text-decoration: none;
}

.team-header h3 a:hover {
  color: var(--link);
}

.team-links {
  margin: 8px 0 0 0;
  font-size: 14px;
}

.team-links a {
  color: var(--link);
  text-decoration: none;
}

.team-links a:hover {
  text-decoration: underline;
}

.team-links .placeholder-link {
  color: var(--link);
  font-style: normal;
  cursor: pointer;
  pointer-events: auto;
}

.bio {
  margin: 0;
  line-height: 1.7;
}

/* Game showcase styles */
.game-showcase {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 20px;
}

.game-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.game-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card a:hover img {
  transform: scale(1.02);
  border-color: var(--link);
}

.game-info h3 {
  margin: 0 0 12px 0;
  font-size: 22px;
}

.game-info h3 a {
  color: var(--text);
  text-decoration: none;
}

.game-info h3 a:hover {
  color: var(--link);
}

.game-info p {
  margin: 0 0 12px 0;
  line-height: 1.7;
}

.game-link {
  display: inline-block;
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  margin-top: 8px;
}

.game-link:hover {
  text-decoration: underline;
}

.game-status {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(124, 196, 255, 0.1);
  border: 1px solid var(--link);
  border-radius: 16px;
  color: var(--link);
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
}

/* Game detail page styles */
.game-detail h2 {
  margin-bottom: 8px;
}

.game-detail .game-status {
  margin: 0 0 20px 0;
}

.game-detail-hero {
  margin: 24px 0;
}

.game-detail-hero img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.game-description h3 {
  margin: 24px 0 12px 0;
  font-size: 20px;
}

.game-description p {
  margin: 0 0 16px 0;
  line-height: 1.7;
}

.game-description ul {
  margin: 0 0 16px 0;
  padding-left: 24px;
  line-height: 1.8;
}

.game-description li {
  margin-bottom: 8px;
}

.game-description a {
  color: var(--link);
  text-decoration: none;
}

.game-description a:hover {
  text-decoration: underline;
}

/* Video embed */
.video-embed {
  margin: 20px 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
}

.video-embed iframe {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16/9;
  border-radius: 8px;
}

.placeholder-message {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

.placeholder-message a {
  color: var(--link);
  text-decoration: none;
}

.placeholder-message a:hover {
  text-decoration: underline;
}

/* Portfolio page */
.portfolio-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 8px;
}

.portfolio-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.credits-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.credit-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.credit-item:last-child {
  border-bottom: none;
}

.credit-item strong {
  font-size: 16px;
  color: var(--text);
}

.credit-details {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.credit-details a {
  color: var(--link);
  text-decoration: none;
  margin-left: 8px;
}

.credit-details a:hover {
  text-decoration: underline;
}

.specialties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.specialties-grid h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--link);
}

.specialties-grid p {
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
}

/* Featured games (games.html) */
.game-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.game-featured-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-featured a:hover .game-featured-image {
  transform: scale(1.02);
  border-color: var(--link);
}

.game-featured-info h2 {
  margin: 0 0 8px 0;
  font-size: 26px;
}

.game-featured-info h2 a {
  color: var(--text);
  text-decoration: none;
}

.game-featured-info h2 a:hover {
  color: var(--link);
}

.game-featured-info h3 {
  margin: 20px 0 12px 0;
  font-size: 18px;
}

.game-featured-info .game-intro {
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.7;
}

.game-featured-info ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
  line-height: 1.7;
}

.game-featured-info li {
  margin-bottom: 6px;
}

.game-links-inline {
  margin-top: 20px;
  font-size: 16px;
}

.game-links-inline a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}

.game-links-inline a:hover {
  text-decoration: underline;
}

.game-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.game-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--link);
  color: var(--bg);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.game-button:hover {
  opacity: 0.9;
}

.game-button-secondary {
  background: transparent;
  border: 1px solid var(--link);
  color: var(--link);
}

.game-button.placeholder-link {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--muted);
  cursor: default;
  pointer-events: none;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .team-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  h1 {
    font-size: 28px;
  }
  
  .game-card {
    grid-template-columns: 1fr;
  }
  
  .game-featured {
    grid-template-columns: 1fr;
  }

  .team-preview {
    grid-template-columns: 1fr;
  }
}

/* Team preview styles for home page */
.team-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.team-preview-member {
  display: flex;
  align-items: center;
  gap: 16px;
}

.team-preview-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.team-preview-member a:hover .team-preview-photo {
  transform: scale(1.05);
  border-color: var(--link);
}

.team-preview-info {
  flex: 1;
}

.team-preview-info h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
}

.team-preview-info h3 a {
  color: var(--text);
  text-decoration: none;
}

.team-preview-info h3 a:hover {
  color: var(--link);
}

.team-preview-role {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* Vertical team preview for home page */
.team-preview-vertical {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 20px;
}

.team-preview-member-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-preview-header-vertical {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.team-preview-photo-small {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.team-preview-header-vertical a:hover .team-preview-photo-small {
  transform: scale(1.05);
  border-color: var(--link);
}

.team-preview-name-box {
  flex: 1;
  padding-top: 2px;
}

.team-preview-name-box h3 {
  margin: 0 0 2px 0;
  font-size: 18px;
}

.team-preview-name-box h3 a {
  color: var(--text);
  text-decoration: none;
}

.team-preview-name-box h3 a:hover {
  color: var(--link);
}

.team-preview-role-small {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
}

.team-preview-text {
  padding-left: 0;
}

.team-preview-blurb {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* Carousel */
.carousel {
  position: relative;
  margin-top: 12px;
}

.carousel-viewport {
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.carousel-image {
  display: block;
  width: 100%;
  height: clamp(260px, 40vw, 460px);
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.carousel-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
}

.thumb img {
  display: block;
  width: 140px;
  height: 78px;
  object-fit: cover;
}

.thumb.is-active {
  border-color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 520px) {
  .thumb img {
    width: 110px;
    height: 62px;
  }
}

/* Games page: stacked images for The Realm */
.game-featured-image-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Ensure stacked images keep the same sizing rules as the existing featured image */
.game-featured-image-stack .game-featured-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Team page bio cards — clean, no color tints */

/* Make person names and game names clearly clickable links */
.team-header h3 a,
.team-preview-name-box h3 a,
.game-info h3 a,
.game-featured-info h2 a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(124, 196, 255, 0.4);
  transition: text-decoration-color 0.2s ease;
}

.team-header h3 a:hover,
.team-preview-name-box h3 a:hover,
.game-info h3 a:hover,
.game-featured-info h2 a:hover {
  text-decoration-color: var(--link);
}

/* Working title subtitle */
.working-title {
  display: block;
  font-size: 0.7em;
  font-weight: 400;
  font-style: italic;
  margin-top: 2px;
}
