/* Theme: Black & White — Hybrid Layout */
/* About page: 2-column grid with sidebar. Project pages: full-width with bottom nav. */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #ffffff;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

a { color: #1a1a1a; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #555; }

/* ============================================
   ABOUT PAGE — 2-column grid with sidebar
   ============================================ */
body.page-about {
  display: grid;
  grid-template-columns: 1fr 540px;
  gap: 2.5rem;
  grid-template-rows: auto auto;
}

/* ============================================
   PROJECT PAGES — single column, bottom nav
   ============================================ */
body.page-project,
body.page-projects,
body.page-contact {
  display: flex;
  flex-direction: column;
  max-width: 860px;
}

/* --- TOP BAR (about page) --- */
.top-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  padding-bottom: 1rem;
}

.top-bar .site-name { font-size: 1.4rem; font-weight: 800; color: #1a1a1a; margin-right: auto; }
.top-bar .contact-links { display: flex; gap: 1.25rem; }
.top-bar .contact-links a { font-size: 0.9rem; font-weight: 700; color: #1a1a1a; text-decoration: none; }
.top-bar .contact-links a:hover { text-decoration: underline; }

/* --- NAV (project pages, contact page) --- */
nav:not(.sidebar-nav) {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
}

nav .site-name { font-size: 1.4rem; font-weight: 800; color: #1a1a1a; margin-right: auto; }
nav .site-name a { color: inherit; text-decoration: none; }
nav .site-name a:hover { text-decoration: none; }
nav .contact-links { display: flex; gap: 1.25rem; }
nav .contact-links a { font-size: 0.9rem; font-weight: 700; color: #1a1a1a; text-decoration: none; }
nav .contact-links a:hover { text-decoration: underline; }

/* ============================================
   SIDEBAR — About page: full cards with thumbs
   ============================================ */
body.page-about .sidebar {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

body.page-about .sidebar-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

body.page-about .sidebar-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.3rem;
}

body.page-about .project-card-link {
  position: relative;
  display: block;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1.5px solid #ddd;
  background: #fafafa;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  transition: border-color 0.15s;
}

body.page-about .project-card-link:hover { border-color: #999; }

/* ============================================
   SIDEBAR — Project pages: bottom nav strip
   ============================================ */
body.page-project .sidebar,
body.page-projects .sidebar {
  order: 99;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1.5px solid #ddd;
}

body.page-project .sidebar-nav,
body.page-projects .sidebar-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

body.page-project .sidebar-thumb,
body.page-projects .sidebar-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.3rem;
}

body.page-project .project-card-link,
body.page-projects .project-card-link {
  position: relative;
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fafafa;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  transition: border-color 0.15s;
}

body.page-project .project-card-link:hover,
body.page-projects .project-card-link:hover { border-color: #999; }
body.page-project .project-card-link.active,
body.page-projects .project-card-link.active { border-color: #1a1a1a; background: #f0f0f0; }

/* --- Shared card elements --- */
.card-main { display: block; text-decoration: none; color: inherit; }
.card-main:hover { text-decoration: none; color: inherit; }

.project-meta { display: block; font-size: 0.75rem; font-weight: 400; color: #777; margin-top: 0.15rem; }
.project-role { display: block; font-size: 0.75rem; color: #555; font-weight: 600; }

/* --- STEAM ICON — bottom-right, larger --- */
.steam-link {
  position: absolute;
  bottom: 0.4rem;
  right: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #1b2838;
  text-decoration: none;
  border-radius: 4px;
  background: rgba(255,255,255,0.8);
  transition: color 0.15s, background 0.15s;
}

.steam-link:hover { color: #66c0f4; background: #1b2838; text-decoration: none; }
.steam-icon { width: 18px; height: 18px; }

/* --- MAIN --- */
body.page-about .main { grid-column: 1; grid-row: 2; }
body.page-project .main,
body.page-projects .main,
body.page-contact .main { order: 1; }

/* --- HERO --- */
.hero { display: flex; gap: 2rem; align-items: flex-start; margin-bottom: 2.5rem; }
.hero-portrait { width: 180px; height: 225px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.hero-text .tagline { font-size: 1.3rem; font-weight: 800; color: #1a1a1a; margin-bottom: 0.5rem; line-height: 1.2; }
.hero-text p { color: #444; margin-bottom: 0.75rem; }

/* --- SECTIONS --- */
section { margin-bottom: 2rem; }
section h2 {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- TEAM INFO --- */
.team-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.discipline {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1.5px solid #ccc;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
}

/* --- PROJECT DETAIL --- */
.project-header h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.25rem; color: #1a1a1a; }
.project-header .role { font-size: 1rem; color: #555; font-weight: 600; margin-bottom: 0.25rem; }
.project-header .meta { font-size: 0.95rem; color: #777; margin-bottom: 1.5rem; }

.video-container { position: relative; width: 100%; padding-bottom: 56.25%; margin-bottom: 1.5rem; background: #000; border-radius: 10px; overflow: hidden; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.project-body p { margin-bottom: 0.75rem; color: #444; }
.project-body .stat { font-weight: 700; color: #1a1a1a; }

.steam-widget { margin-top: 1.5rem; }
.steam-widget iframe { border: 0; max-width: 100%; }

/* --- PROJECT LIST --- */
.project-list { display: flex; flex-direction: column; gap: 1.5rem; }
.project-card { display: flex; gap: 1.25rem; align-items: flex-start; text-decoration: none; color: inherit; padding: 1rem; border-radius: 10px; border: 1.5px solid #ddd; }
.project-card:hover { text-decoration: none; border-color: #999; }
.project-card:hover .project-card-title { color: #555; }
.project-card-thumb { width: 200px; height: 113px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #eee; }
.project-card-info { flex: 1; }
.project-card-title { font-size: 1.05rem; font-weight: 700; color: #1a1a1a; margin-bottom: 0.25rem; }
.project-card-meta { font-size: 0.9rem; color: #777; margin-bottom: 0.15rem; }
.project-card-role { font-size: 0.9rem; color: #555; }

/* --- CONTACT PAGE --- */
.contact-info { margin-top: 1rem; }
.contact-info h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 1.5rem; }
.contact-item { margin-bottom: 1rem; font-size: 1.05rem; }
.contact-item a { color: #1a1a1a; }
.contact-label { display: block; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #777; margin-bottom: 0.15rem; }

/* --- RESPONSIVE --- */
@media (max-width: 700px) {
  body.page-about { grid-template-columns: 1fr; gap: 0; }
  body.page-about .top-bar { grid-column: 1; margin-bottom: 1rem; }
  body.page-about .sidebar { grid-column: 1; grid-row: auto; margin-bottom: 2rem; }
  body.page-about .sidebar-nav { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
  body.page-about .sidebar-nav .project-role { display: none; }
  body.page-about .sidebar-thumb { display: none; }
  body.page-about .main { grid-column: 1; grid-row: auto; }
  .hero { flex-direction: column; align-items: center; text-align: center; }
  .hero-portrait { width: 150px; height: 188px; }
  nav { flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
  body.page-project .sidebar-nav,
  body.page-projects .sidebar-nav { grid-template-columns: repeat(2, 1fr); }
  body.page-project .sidebar-thumb,
  body.page-projects .sidebar-thumb { display: none; }
  body.page-project .project-meta,
  body.page-project .project-role,
  body.page-projects .project-meta,
  body.page-projects .project-role { display: none; }
  .project-card { flex-direction: column; }
  .project-card-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}
