:root {
  --bg-main: #071a33;
  --bg-soft: #0b2447;
  --surface: #0e2b52;
  --surface-strong: #103565;
  --border: #1f4a80;
  --text-main: #e8f1ff;
  --text-soft: #9fb7d8;
  --accent: #7cc5ff;
  --accent-strong: #9bd6ff;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  color: var(--text-main);
  line-height: 1.6;
  background: radial-gradient(circle at top, #10305d 0%, var(--bg-main) 40%, #061326 100%);
}

.home-page {
  position: relative;
  overflow-x: hidden;
}

#binary-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-strong);
}

.muted {
  color: var(--text-soft);
}

.navbar {
  width: 100%;
  background: rgba(6, 19, 38, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 0;
}

.navbar a {
  color: #b8cff0;
  display: inline-block;
  font-size: 15px;
  padding: 10px;
  text-decoration: none;
}

.navbar a:hover {
  color: #ffffff;
}

.content {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 12px 50px;
}

h1,
h2,
h3 {
  color: #f4f8ff;
}

hr,
.page hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

footer {
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
  padding: 40px 0 20px;
}

footer p,
footer a {
  font-size: 12px;
  color: var(--text-soft);
}

.card,
.week-card,
.home-tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(11, 36, 71, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

figure {
  margin: 12px 0 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

figure figcaption {
  font-size: 12px;
  color: var(--text-soft);
  padding: 8px;
}

.empty-box {
  border: 1px dashed #4b77ad;
  border-radius: 10px;
  background: rgba(19, 58, 108, 0.4);
  padding: 16px;
  color: #bbd0ea;
  font-size: 14px;
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid #5f94cd;
  border-radius: 10px;
  background: var(--surface-strong);
  color: #ecf5ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  margin: 8px 0 12px;
}

.btn:hover {
  background: #1c4b87;
  border-color: #82b0e0;
}

code {
  background: #133862;
  color: #e6f0ff;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}

.page-links,
.page-links a {
  color: var(--text-soft);
}

/* --- Home tiles (index.html) --- */
.home-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}

.home-stack {
  width: min(980px, 100%);
}

.home-hero {
  text-align: center;
  margin-bottom: 20px;
}

.home-hero-title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.home-hero-subtitle {
  margin-top: 8px;
  font-size: clamp(16px, 2vw, 22px);
  color: #c7dbf6;
}

.home-tiles {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .home-tiles {
    grid-template-columns: 1fr;
  }
}

.home-tile {
  min-height: 220px;
  padding: 40px 32px;
  text-decoration: none;
  color: #f1f6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-tile:hover {
  transform: translateY(-6px);
  border-color: #7ea8d8;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
}

.home-tile-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* --- Weekly grid (weekly-assignments.html) --- */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 64px;
}

.page h1 {
  font-size: 34px;
  letter-spacing: -0.02em;
  margin: 8px 0 10px;
  color: #f4f8ff;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

@media (max-width: 980px) {
  .week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .week-grid {
    grid-template-columns: 1fr;
  }
}

.week-card {
  min-height: 126px;
  padding: 14px;
  text-decoration: none;
  color: #f1f6ff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.week-card:hover {
  transform: translateY(-6px);
  border-color: #7ea8d8;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
}

.week-card .wk {
  font-size: 12px;
  color: #b5c9e4;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.week-card .title {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 800;
}
