:root {
  --bg: #0f0f10;
  --surface: #1e1e20;
  --text: #ededef;
  --text-muted: #888890;
  --primary: #646cff;
  --primary-active: #535bf2;
  --border: #2e2e32;
  --line-color: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Container with Lines */
.layout-container {
  max-width: 1200px;
  margin: 0 auto;
  border-left: 1px solid var(--line-color);
  border-right: 1px solid var(--line-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
nav {
  height: 64px;
  border-bottom: 1px solid var(--line-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(15, 15, 16, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-right: 1px solid transparent;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover {
  color: #fff;
}

/* Tech Strip (Top) */
.tech-strip {
  display: flex;
  border-bottom: 1px solid var(--line-color);
  overflow-x: auto;
}

.tech-item {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  border-right: 1px solid var(--line-color);
  gap: 0.5rem;
  white-space: nowrap;
}

.tech-item:last-child {
  border-right: none;
}

.tech-item span {
  transition: color 0.2s;
}

.tech-item:hover span {
  color: #fff;
}

/* Hero */
.hero {
  padding: 8rem 2rem 6rem;
  text-align: center;
  border-bottom: 1px solid var(--line-color);
  background: radial-gradient(circle at center, rgba(100, 108, 255, 0.08) 0%, transparent 50%);
}

h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(to bottom right, #fff, #a0a0aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.cta-wrapper {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-active);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line-color);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* MED-15: replaces the former style="font-size: 0.9rem" attribute. */
.btn-sm {
  font-size: 0.9rem;
}

/* Grid Layout Shared */
.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

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

.grid-item {
  padding: 4rem;
  border-bottom: 1px solid var(--line-color);
  border-right: 1px solid var(--line-color);
}

.grid-item:nth-child(2n) {
  border-right: none;
}

@media (max-width: 900px) {
  .grid-item,
  .grid-item:nth-child(2n) {
    border-right: none;
  }
}

.grid-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.grid-content p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 450px;
}

/* MED-15: replaces the former inline styles on the architecture checklist. */
.check-list {
  list-style: none;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.check-list li {
  margin-bottom: 0.5rem;
}

.check-icon {
  color: var(--primary);
  display: inline;
  vertical-align: middle;
}

/* Code Window */
.code-window {
  background: #141416;
  border: 1px solid var(--line-color);
  border-radius: 8px;
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.code-window::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: var(--primary);
  filter: blur(60px);
  opacity: 0.1;
  top: -50px;
  right: -50px;
}

.line {
  display: block;
  color: #a0a0aa;
  margin-bottom: 0.25rem;
}

.keyword {
  color: #c996cc;
}
.string {
  color: #98c379;
}
.func {
  color: #61afef;
}
.comment {
  color: #5c6370;
}
.tree-line {
  color: #abb2bf;
  line-height: 1.6;
}

/* Feature Grid */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line-color);
}

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

.feature-box {
  padding: 2.5rem;
  border-right: 1px solid var(--line-color);
  border-bottom: 1px solid var(--line-color);
  transition: background 0.2s;
}

.feature-box:hover {
  background: rgba(255, 255, 255, 0.02);
}

.feature-box:nth-child(3n) {
  border-right: none;
}

@media (max-width: 900px) {
  .feature-box,
  .feature-box:nth-child(3n) {
    border-right: none;
  }
}

.feature-box i {
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-box h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #fff;
}

.feature-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Structure Section */
.structure-section {
  background: #111113;
}

/* Footer */
footer {
  padding: 4rem 2rem;
  background: #0f0f10;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  footer {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

.footer-col h5 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #fff;
}

/* MED-15: replaces the former inline styles on the footer brand heading. */
.footer-col h5.footer-brand {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-col p,
.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line-color);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
