:root {
  --background: #0f1115;
  --surface: #171a21;
  --text: #e6e8ee;
  --muted: #a3a8b3;
  --accent: #7fb0ff;
  --accent-soft: #2a2f3b;
  --border: #2c313c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-title {
  margin: 0;
  font-size: 1.4rem;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.75rem;
}

.nav-list a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 0.45rem;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--accent-soft);
  color: var(--text);
}

.nav-list a.active {
  background: var(--accent);
  color: #101319;
}

.content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

h2,
h3 {
  margin-top: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  background: transparent;
  border: 0;
  padding: 0;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 1rem;
}

.post-meta {
  margin: 0 0 0.4rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.class-picker {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #141821;
}

.class-picker summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.7rem 0.85rem;
}

.class-picker[open] summary {
  border-bottom: 1px solid var(--border);
}

.assignment-list {
  margin: 0;
  padding: 0.75rem 1.75rem 0.9rem;
}

.assignment-list li {
  margin: 0.35rem 0;
}

.assignment-list a {
  color: var(--accent);
  text-decoration: none;
}

.assignment-list a:hover,
.assignment-list a:focus-visible {
  text-decoration: underline;
}

.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 1rem;
}

.post figure {
  margin: 1rem 0;
}

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

.post figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-gallery {
  display: grid;
  gap: 1rem;
}

.project-gallery figure {
  margin: 0;
}

.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.code-sample {
  overflow-x: auto;
  background: #0c0f14;
  color: #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.8rem;
}

.inline-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.context-box {
  margin: 0.9rem 0 1.1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #4f74b8;
  border-left: 6px solid #8fc2ff;
  border-radius: 0.55rem;
  background: #1b2333;
  box-shadow: inset 0 0 0 1px rgba(143, 194, 255, 0.18);
}

.context-box::before {
  content: "Context";
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #8fc2ff;
  color: #0f1726;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.context-box p {
  margin: 0 0 0.5rem;
}

.context-box p:last-child {
  margin-bottom: 0;
}

.site-footer {
  text-align: center;
  padding: 1rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
