/* Maro Style Guide — Context Raven brand */

:root {
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;
  --text-inverse: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fafafc;
  --bg-dark: #1d1d1f;
  --accent: #26a6a6;
  --accent-hover: #219494;
  --link: #26a6a6;
  --border-light: rgba(0, 0, 0, 0.06);
  --border-subtle: rgba(0, 0, 0, 0.04);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --font: ui-monospace, 'SF Mono', 'Consolas', 'Menlo', 'DejaVu Sans Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  html:not(.light) {
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-tertiary: #a1a1a6;
    --text-inverse: #1d1d1f;
    --bg-primary: #1d1d1f;
    --bg-secondary: #2d2d2f;
    --bg-tertiary: #252527;
    --bg-dark: #000000;
    --accent: #4cbaba;
    --accent-hover: #5cc8c8;
    --link: #4cbaba;
    --border-light: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --nav-bg: rgba(29, 29, 31, 0.72);
  }
}

html.dark {
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #a1a1a6;
  --text-inverse: #1d1d1f;
  --bg-primary: #1d1d1f;
  --bg-secondary: #2d2d2f;
  --bg-tertiary: #252527;
  --bg-dark: #000000;
  --accent: #4cbaba;
  --accent-hover: #5cc8c8;
  --link: #4cbaba;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --nav-bg: rgba(29, 29, 31, 0.72);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Base */
body {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 450;
  line-height: 1.75;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-link:hover { color: var(--accent); }

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-secondary);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.theme-toggle:hover { color: var(--accent); }
.icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not(.light) .icon-sun { display: none; }
  html:not(.light) .icon-moon { display: block; }
}
html.dark .icon-sun { display: none; }
html.dark .icon-moon { display: block; }
html.light .icon-sun { display: block; }
html.light .icon-moon { display: none; }

/* Main content offset for fixed nav */
main { padding-top: 48px; }

/* Container */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Hero section */
.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 160px 22px 100px;
}

.eyebrow {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.24;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.subtitle {
  font-size: 20px;
  font-weight: 450;
  line-height: 1.38;
  letter-spacing: 0.011em;
  color: var(--text-tertiary);
}

/* Alternating backgrounds */
.bg-alt { background: var(--bg-secondary); }

/* Post list (cards) */
.posts-section { padding: 100px 0; }

.post-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.post-card:first-child { border-top: 1px solid var(--border-light); }
.post-card:hover { transform: translateX(4px); }

.post-card-content { flex: 1; }

.post-card time {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.33;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-card h3 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: 0.009em;
  color: var(--text-primary);
  margin-top: 4px;
}

.post-excerpt {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.016em;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.post-arrow {
  font-size: 24px;
  color: var(--accent);
  margin-left: 24px;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.post-card:hover .post-arrow { transform: translateX(4px); }

/* Article (single post) */
article {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
}

.article-header {
  padding: 100px 0 48px;
  max-width: 680px;
}

.back-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--link);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 32px;
  transition: color 0.3s;
}
.back-link:hover { text-decoration: underline; }

.article-header time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-header .updated {
  font-size: 12px;
  color: var(--text-secondary);
}

.article-header h1 {
  margin-top: 16px;
  margin-bottom: 12px;
}

.article-header .subtitle {
  margin-bottom: 0;
}

/* Article body content */
.article-body {
  max-width: 680px;
  padding-bottom: 100px;
}

.article-body h1 {
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.003em;
  margin-top: 48px;
  margin-bottom: 16px;
}

.article-body h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.003em;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
}

.article-body h3 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: 0.009em;
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-body h4 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.24;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 8px;
}

.article-body p {
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.article-body a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.3s;
}
.article-body a:hover { text-decoration: underline; }

.article-body strong { color: var(--text-primary); font-weight: 700; }

.article-body ul, .article-body ol {
  color: var(--text-tertiary);
  padding-left: 24px;
  margin-bottom: 24px;
}
.article-body li { margin-bottom: 8px; }

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-body pre {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.article-body code {
  font-size: 0.85em;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
}

.article-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}

.article-body th {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-light);
}

.article-body td {
  color: var(--text-tertiary);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 48px 0;
}

/* Checkboxes */
.article-body input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-light);
  border-radius: 3px;
  vertical-align: middle;
  position: relative;
  margin-right: 8px;
}
.article-body input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.article-body input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--text-inverse);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Footer */
footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 22px;
  border-top: 1px solid var(--border-light);
}

footer p {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.33;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 734px) {
  .hero { padding: 120px 22px 64px; }
  h1 { font-size: 34px; }
  .posts-section { padding: 64px 0; }
  .post-card h3 { font-size: 24px; }
  .article-header { padding: 64px 0 32px; }
  .article-body { padding-bottom: 64px; }
  .article-body h2 { font-size: 28px; }
  .article-body h3 { font-size: 24px; }
}

@media (min-width: 735px) and (max-width: 1068px) {
  h1 { font-size: 36px; }
}
