:root {
  --bg: #0b0b0b;
  --text: #e8e8e8;
  --accent: #ff2e2e;
  --muted: #888;
  --border: #222;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* HEADER */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.logo {
    width: 187px;
    height: 50px;
}

.nav {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* CONTAINER */

.container {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* BREADCRUMBS */

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* HERO */

.hero h1 {
  font-size: 2.5rem;
  margin: 0;
  letter-spacing: -0.03em;
}

.hero p {
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ARTICLES */

.articles {
  margin-top: 2rem;
}

.card {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.card h2 {
  margin: 0;
  font-size: 1.4rem;
}

.card a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.card a:hover {
  background: var(--accent);
  color: #000;
}

.card p {
  color: var(--muted);
  margin-top: 0.3rem;
}

/* FOOTER */

.footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ARTICLE PAGE */

.article-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
}

.meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.content {
  margin-top: 2rem;
}

.content h2 {
  margin-top: 2rem;
  font-size: 1.4rem;
}

.content p {
  margin: 1rem 0;
}

.content ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.content pre {
  background: #050505;
  border: 1px solid var(--border);
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.content code {
  font-family: monospace;
  font-size: 0.9rem;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
}

.article-nav a {
  text-decoration: none;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}

.article-nav a:hover {
  background: var(--accent);
  color: #000;
}

/* HOME */

.home-hero {
  margin-top: 2rem;
}

.home-hero h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.home-sub {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 600px;
}

/* SECTIONS */

.home-section {
  margin-top: 3rem;
}

.home-section h2 {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* LIST */

.home-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.home-item {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.home-item-title {
  border-bottom: 2px solid var(--accent);
}

.home-item:hover .home-item-title {
  background: var(--accent);
  color: #000;
}

.home-item-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* INLINE LINK */

.inline-link {
  display: inline-block;
  margin-top: 0.5rem;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
}

.inline-link:hover {
  background: var(--accent);
  color: #000;
}

/* ABOUT */

.about-page h1 {
  margin-bottom: 1rem;
}

.about-page ul {
  margin: 1rem 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

/* PROJECTS */

.projects-page .project {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.projects-page h2 {
  margin: 0;
}

/* CONTACT */

.contact-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.contact-links a {
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
}

.contact-links a:hover {
  background: var(--accent);
  color: #000;
}

/* ARTICLES PAGE (2-LEVEL) */

.articles-page h1 {
  margin-bottom: 2rem;
}

.topic {
  margin-bottom: 2.5rem;
}

.topic h2 {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

/* LIST */

.topic-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.topic-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

/* LINKS */

.topic-list a {
  text-decoration: none;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}

.topic-list a:hover {
  background: var(--accent);
  color: #000;
}

.canvas-container {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 4 / 3;
}

.canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}