/* ============================================
   Simbiosi.org — Editorial Brutalist
   Single CSS file. No SASS. No frameworks.
   ============================================ */

:root {
  --bg:        #111110;
  --bg-raised: #1a1a18;
  --text:      #e5ddd0;
  --text-dim:  #8a8478;
  --accent:    #6b8f5e;
  --accent-h:  #8ab87a;
  --warm:      #d4a853;
  --border:    #2a2926;
  --font-head: 'Newsreader', Georgia, serif;
  --font-body: 'Literata', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-w:     42rem;
  --space:     1.6rem;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Navigation ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--space);
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
  background: var(--bg);
}

.site-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space);
  right: var(--space);
  height: 1px;
  background: var(--border);
}

.nav-logo img {
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-logo:hover img { opacity: 1; }

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

.nav-links a {
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  padding-bottom: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active {
  border-bottom: 1px solid var(--accent);
}

/* ---- Content ---- */
.content {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem var(--space) 6rem;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 2.4rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.6rem; margin-top: 3rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.05rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.25rem; }

a {
  color: var(--accent);
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

a:hover {
  color: var(--accent-h);
  text-decoration-color: var(--accent-h);
}

strong { font-weight: 600; color: var(--text); }
em { font-style: italic; }

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  color: var(--text-dim);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li { margin-bottom: 0.4rem; }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-raised);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 2rem 0;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* ---- Home / Manifesto ---- */
.manifesto {
  padding-top: 2rem;
}

.manifesto-eyebrow {
  font-family: var(--font-head);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.manifesto-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.manifesto h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 2rem;
  max-width: 18ch;
}

.manifesto h1 .accent {
  color: var(--accent);
}

.manifesto-lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 55ch;
}

.manifesto-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--warm);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.manifesto-section {
  margin-top: 3rem;
}

.manifesto-section h2 {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---- Blog listing ---- */
.blog-list {
  list-style: none;
  padding: 0;
}

.blog-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.blog-item:first-child {
  padding-top: 0;
}

.blog-item time {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-head);
  letter-spacing: 0.03em;
}

.blog-item h3 {
  margin: 0.3rem 0 0.4rem;
  font-size: 1.3rem;
}

.blog-item h3 a {
  color: var(--text);
  text-decoration: none;
}

.blog-item h3 a:hover {
  color: var(--accent);
}

.blog-item p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  padding: 4rem 0;
}

/* ---- Post ---- */
.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-title {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
}

.post-date {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--font-head);
}

.post-tags {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(107, 143, 94, 0.1);
  padding: 0.2em 0.6em;
  border-radius: 3px;
  font-family: var(--font-head);
}

.post-content {
  margin-bottom: 3rem;
}

.post-footer {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-footer a {
  font-size: 0.9rem;
}

/* ---- Page ---- */
.page-title {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ---- Projects ---- */
.project-section {
  margin-bottom: 3rem;
}

.project-section h2 {
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.project-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.project-card {
  background: var(--bg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  transition: background 0.2s;
}

.project-card:hover {
  background: var(--bg-raised);
}

.project-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  min-width: fit-content;
}

.project-name a {
  color: var(--text);
  text-decoration: none;
}

.project-name a:hover {
  color: var(--accent);
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.project-role {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warm);
  font-family: var(--font-head);
  white-space: nowrap;
}

/* ---- Footer ---- */
.site-footer {
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
  padding: 2rem var(--space);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-badge {
  margin-bottom: 1rem;
}

.footer-badge img {
  max-height: 40px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-badge img:hover {
  opacity: 1;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.25rem;
}

/* ---- 404 ---- */
.lost {
  text-align: center;
  padding: 6rem 0;
}

.lost h1 {
  font-size: 4rem;
  color: var(--text-dim);
}

.lost p {
  color: var(--text-dim);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  html { font-size: 16px; }

  .manifesto h1 { font-size: 2rem; }

  .site-nav {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .nav-links { gap: 1rem; flex-wrap: wrap; }

  .content { padding: 2.5rem var(--space) 4rem; }

  .manifesto-stats {
    grid-template-columns: 1fr 1fr;
  }

  .project-card {
    flex-direction: column;
    gap: 0.25rem;
  }

  .post-title { font-size: 1.8rem; }
}

/* ---- Subtle grain texture ---- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  z-index: 9999;
}

/* ---- Fade in ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.content {
  animation: fadeUp 0.5s ease-out;
}
