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

/* Variables */
:root {
  --brand: #c00000;
  --text: #1a1a1a;
  --text-light: #666;
  --bg: #fff;
  --border: #eee;
}

/* Base */
html {
  font-size: 16px;
}

body {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1rem;
  width: 100%;
}

/* Typography */
h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus,
button:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  outline-offset: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
header {
  background: var(--brand);
}

.header-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}

.logo-icon {
  flex-shrink: 0;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.8;
}

header nav {
  display: flex;
  gap: 1.5rem;
}

header nav a {
  color: #fff;
  font-size: 0.9rem;
}

header nav a:hover {
  opacity: 0.8;
}

header .social {
  display: flex;
  gap: 0.75rem;
}

header .social a {
  color: rgba(255, 255, 255, 0.8);
}

header .social a:hover {
  color: #fff;
}

.social {
  display: flex;
  gap: 0.75rem;
}

.social a {
  color: var(--text-light);
}

.social a:hover {
  color: var(--brand);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  text-align: center;
}

footer nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

footer nav a {
  color: var(--text);
  font-size: 0.9rem;
}

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

footer .social {
  justify-content: center;
  margin-bottom: 1rem;
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-light);
}

.credits {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Posts list */
.posts {
  list-style: none;
}

.posts li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.posts li:last-child {
  border-bottom: none;
}

.posts .date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.posts h2 {
  margin-bottom: 0.5rem;
}

.posts h2 a {
  color: var(--text);
}

.posts h2 a:hover {
  color: var(--brand);
}

/* Team */
.team-member {
  margin-bottom: 2rem;
}

.team-member img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.team-member h3 {
  margin-bottom: 0.25rem;
}

.team-member .role {
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

@media (max-width: 480px) {
  .team-member img {
    float: none;
    display: block;
    margin: 0 auto 1rem;
  }

  .team-member {
    text-align: center;
  }
}

/* Post meta */
.post-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* Game grid */
.game-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.game-card {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.game-card:hover {
  border-color: var(--brand);
}

.game-card-content {
  flex: 1;
  padding: 1.5rem;
  min-width: 0;
}

.polaroid {
  flex-shrink: 0;
  align-self: flex-start;
  background: #fff;
  padding: 8px;
  padding-bottom: 32px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.game-card-image {
  display: block;
  width: 220px;
  aspect-ratio: 315 / 250;
  object-fit: cover;
}

/* Polaroid random rotations */
.game-card:nth-child(1) .polaroid {
  transform: rotate(-3deg);
}

.game-card:nth-child(2) .polaroid {
  transform: rotate(2deg);
}

.game-card:nth-child(3) .polaroid {
  transform: rotate(-4deg);
}

.game-card:nth-child(4) .polaroid {
  transform: rotate(3deg);
}

.game-card:hover .polaroid {
  transform: rotate(0deg) scale(1.02);
}

.game-card h3 {
  margin-bottom: 0.5rem;
}

.game-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  margin-bottom: 0.25rem;
}

.game-tech {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.game-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.game-link:hover {
  background: #a00000;
  text-decoration: none;
  color: #fff;
}

@media (max-width: 480px) {
  .game-card {
    flex-direction: column-reverse;
  }

  .polaroid {
    margin: 8px auto;
  }

  .game-card-image {
    width: calc(100vw - 80px);
    max-width: 280px;
  }
}

/* Blueprint Lab Section */
.blueprint {
  --bp-blue: #1e3a5f;
  --bp-light: #2a4a6f;
  --bp-grid: #3a5a7f;
  --bp-text: #e8f0f8;
  --bp-accent: #7cb3d9;

  background:
    linear-gradient(var(--bp-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px),
    linear-gradient(var(--bp-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-light) 1px, transparent 1px), var(--bp-blue);
  background-size:
    100px 100px,
    100px 100px,
    20px 20px,
    20px 20px;

  margin: 2rem -1rem;
  padding: 2rem 1rem;
  border-radius: 8px;
  color: var(--bp-text);
}

.blueprint h2 {
  font-family: "Architects Daughter", cursive;
  font-size: 2rem;
  color: var(--bp-text);
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.blueprint > p {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  color: var(--bp-accent);
  margin-bottom: 1.5rem;
}

.blueprint .game-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--bp-accent);
  backdrop-filter: blur(4px);
  overflow: visible;
  position: relative;
}

.blueprint .polaroid {
  position: relative;
  margin-right: 16px;
  margin-top: 16px;
}

.blueprint .game-card:hover {
  border-color: var(--bp-text);
  background: rgba(255, 255, 255, 0.1);
}

.blueprint .game-card h3 {
  font-family: "Architects Daughter", cursive;
  color: var(--bp-text);
  font-size: 1.3rem;
}

.blueprint .game-card p {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--bp-accent);
}

.blueprint .game-status {
  color: #90d890;
  border: 1px solid currentColor;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
}

.blueprint .game-tech {
  color: var(--bp-accent);
  opacity: 0.8;
}

.blueprint .game-link {
  background: transparent;
  border: 2px solid var(--bp-accent);
  color: var(--bp-accent);
}

.blueprint .game-link:hover {
  background: var(--bp-accent);
  color: var(--bp-blue);
}

/* Homepage Hero */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.hero-tagline {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* From The Lab Section */
.from-the-lab {
  text-align: center;
  margin-bottom: 3rem;
}

.from-the-lab h2 {
  font-family: "Architects Daughter", cursive;
  font-size: 1.75rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.from-the-lab > p {
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Card Hand Effect */
.card-hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  margin: 0 auto 2rem;
  padding: 2rem 0;
  perspective: 1000px;
}

.card-hand-item {
  display: block;
  width: 160px;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    z-index 0s;
  position: relative;
  text-decoration: none;
}

.card-hand-item:nth-child(1) {
  transform: rotate(-12deg) translateY(10px);
  z-index: 1;
  margin-right: -30px;
}

.card-hand-item:nth-child(2) {
  transform: rotate(0deg) translateY(0);
  z-index: 2;
}

.card-hand-item:nth-child(3) {
  transform: rotate(12deg) translateY(10px);
  z-index: 1;
  margin-left: -30px;
}

.card-hand-item:hover {
  transform: rotate(0deg) translateY(-20px) scale(1.05);
  z-index: 10;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-hand-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.card-hand-title {
  display: block;
  padding: 0.75rem 0.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  background: #fff;
}

.lab-cta {
  margin-bottom: 0;
}

.lab-cta a {
  font-weight: 500;
}

/* Fallout-style Terminal */
.terminal {
  --term-bg: #0a1408;
  --term-green: #4afa4a;
  --term-green-dim: #2a8a2a;
  --term-green-glow: #3aea3a;
  --term-amber: #ffb000;

  background: var(--term-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 40px rgba(74, 250, 74, 0.15),
    inset 0 0 100px rgba(0, 0, 0, 0.5);
  margin-top: 2rem;
}

.terminal-header {
  background: linear-gradient(to bottom, #1a2a18, #0d180b);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--term-green-dim);
}

.terminal-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--term-green);
  letter-spacing: 0.1em;
}

.terminal-status {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--term-green);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.terminal-screen {
  position: relative;
  padding: 1.5rem;
  min-height: 200px;
}

.terminal-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12),
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 10;
  animation: scanlines 0.3s linear infinite;
}

@keyframes scanlines {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 3px;
  }
}

.terminal-content {
  position: relative;
  z-index: 2;
}

.terminal-prompt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  color: var(--term-green);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px var(--term-green-glow);
}

/* Terminal Menu - Fallout style */
.terminal-menu {
  margin: 1.5rem 0;
}

.terminal-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  margin: 0 -0.75rem;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}

.terminal-option:hover {
  background: var(--term-green);
  text-decoration: none;
}

.terminal-option:hover .terminal-arrow,
.terminal-option:hover .terminal-title,
.terminal-option:hover .terminal-date,
.terminal-option:hover .terminal-excerpt {
  color: var(--term-bg);
  text-shadow: none;
}

.terminal-arrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--term-green);
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.terminal-option:hover .terminal-arrow {
  opacity: 1;
}

.terminal-option-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.terminal-option-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.terminal-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--term-green-dim);
}

.terminal-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--term-green);
  text-shadow: 0 0 8px var(--term-green-glow);
}

.terminal-excerpt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--term-green-dim);
  line-height: 1.4;
}

.terminal-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--term-green);
  text-decoration: none;
  text-shadow: 0 0 10px var(--term-green-glow);
  transition: all 0.2s;
}

.terminal-link:hover {
  color: #7fff7f;
  text-shadow: 0 0 20px var(--term-green);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  header nav {
    order: 3;
  }
}
