/* Portfolio – interactive & game projects */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #0f0f12;
  --surface: #1a1a20;
  --text: #e8e8ed;
  --text-muted: #9a9aa8;
  --accent: #6b8cce;
  --accent-hover: #8ba8e8;
  --border: #2a2a32;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* Header */
.site-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.nav {
  display: flex;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.nav a {
  color: var(--text);
  font-weight: 500;
}
.nav a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero {
  padding: 4rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
}
.hero-tagline {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}
.hero-cta {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius);
  font-weight: 600;
}
.hero-cta:hover {
  background: var(--accent-hover);
  color: var(--bg);
  text-decoration: none;
}

/* About */
.about {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.about h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}
.about-content {
  color: var(--text-muted);
}
.about-content p { margin: 0 0 1rem; }
.about-content p:last-child { margin-bottom: 0; }

/* Projects */
.projects {
  padding: 2rem 1.5rem 4rem;
}
.projects h2 {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Project card */
.project-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}
.project-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  background: var(--border);
}
.project-card-body { padding: 1.25rem; }
.project-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}
.project-card-role {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.project-card-blurb {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card-cta {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.project-card-cta:hover { text-decoration: none; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}
.modal-content {
  position: relative;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: var(--border);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.modal-close:hover { background: var(--text-muted); }
.modal-title { margin: 0 0 0.5rem; font-size: 1.35rem; }
.modal-role {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}
.modal-description {
  white-space: pre-line;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.6;
}
.modal-contributions {
  margin: 0 0 1rem;
  color: var(--text-muted);
}
.modal-contributions-title {
  font-weight: 600;
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}
.modal-contributions ul {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
}
.modal-contributions li {
  margin-bottom: 0.25rem;
}
.modal-contributions li:last-child { margin-bottom: 0; }
.modal-platforms,
.modal-awards {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}
.modal-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.modal-links a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 4px;
  font-size: 0.9rem;
}
.modal-links a:hover {
  background: var(--accent-hover);
  color: var(--bg);
  text-decoration: none;
}
.modal-secondary-images {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}
.modal-secondary-images img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  background: var(--border);
}

/* Footer */
.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-stats {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  opacity: 0.9;
}
