/* ============================================================
   Operate Agents — shared design system
   Brand identity: IBM Plex + VHS palette + agent loop
   ============================================================ */

:root {
  /* Foundation */
  --bg: #E6DDC0;            /* aged paper */
  --surface: #F2EBD2;       /* warm card surface */
  --surface-alt: #FFFFFF;   /* crisp pop when needed */
  --text: #3B3937;          /* VHS dark */
  --text-muted: #5E5C59;    /* VHS gray */
  --text-subtle: #8B8377;   /* derived lighter */
  --border: #C9BF9D;        /* warm border */
  --border-strong: #A89F7E;

  /* Accents */
  --accent: #D82B3A;        /* red — primary */
  --accent-hover: #B22230;
  --accent-warm: #E98835;   /* orange */
  --accent-yellow: #EAD538;
  --accent-magenta: #C11F54;
  --accent-purple: #773254;
  --accent-maroon: #5A2C48;

  /* Type */
  --font-sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Rainbow brand element */
  --rainbow-gradient: linear-gradient(
    to right,
    var(--accent-yellow) 0%, var(--accent-yellow) 16.66%,
    var(--accent-warm) 16.66%, var(--accent-warm) 33.33%,
    var(--accent) 33.33%, var(--accent) 50%,
    var(--accent-magenta) 50%, var(--accent-magenta) 66.66%,
    var(--accent-purple) 66.66%, var(--accent-purple) 83.33%,
    var(--accent-maroon) 83.33%, var(--accent-maroon) 100%
  );
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }

.rainbow-stripe { height: 4px; background: var(--rainbow-gradient); }

/* ============================================================
   Header
   ============================================================ */

header { border-bottom: 1px solid var(--border); padding: 24px 0; }
.nav { display: flex; justify-content: space-between; align-items: center; }

.logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  flex-shrink: 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo:hover .logo-mark { transform: rotate(60deg); }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }

/* ============================================================
   Hero (homepage)
   ============================================================ */

.hero { padding: 100px 0 72px; position: relative; }
.hero-mark { width: 64px; height: 4px; margin-bottom: 28px; background: var(--rainbow-gradient); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

h1 {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--text);
}

.hero p {
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 36px;
  max-width: 600px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent); color: #FFF; }

.divider { height: 1px; background: var(--border); margin: 0 0 64px; }

/* ============================================================
   Section labels
   ============================================================ */

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
}

/* ============================================================
   Featured post card (homepage)
   ============================================================ */

.featured { padding-bottom: 80px; }

.post-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  padding: 36px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--rainbow-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.post-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background: var(--surface-alt);
}
.post-card:hover::before { transform: scaleX(1); }

.post-tag {
  font-family: var(--font-mono);
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.post-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 14px;
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-subtle);
}

/* ============================================================
   About (homepage)
   ============================================================ */

.about { padding-bottom: 80px; }
.about p { font-size: 17px; color: var(--text-muted); line-height: 1.7; }
.about strong { color: var(--text); font-weight: 600; }

/* ============================================================
   Newsletter (homepage)
   ============================================================ */

.newsletter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 44px 36px;
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
}
.newsletter::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 200px;
  height: 4px;
  background: var(--rainbow-gradient);
}
.newsletter h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  position: relative;
}
.newsletter p { color: var(--text-muted); margin-bottom: 24px; font-size: 15px; position: relative; }

.signup-form { display: flex; gap: 8px; position: relative; }
.signup-form input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
}
.signup-form input:focus { outline: none; border-color: var(--accent); }
.signup-form button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}
.signup-form button:hover { background: var(--accent-hover); }

/* ============================================================
   Footer
   ============================================================ */

footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 0;
}
.footer-compact { padding-top: 0; }
.footer-compact .footer-content { border-top: none; padding-top: 28px; }
.footer-motto {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  padding-bottom: 32px;
  letter-spacing: -0.005em;
}
.footer-motto .accent { color: var(--accent); }
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-subtle);
  padding-bottom: 28px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-subtle); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); }

/* ============================================================
   Post page
   ============================================================ */

.post { padding: 72px 0 60px; }

.post-header { margin-bottom: 48px; }
.post-header .post-tag { display: inline-block; margin-bottom: 18px; }
.post-header h1 {
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 18px;
}
.post-header .post-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}

.post-body { font-size: 18px; line-height: 1.7; color: var(--text); }
.post-body h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 56px 0 20px;
  color: var(--text);
}
.post-body h3 {
  font-size: 21px;
  font-weight: 600;
  margin: 36px 0 16px;
}
.post-body p { margin-bottom: 22px; }
.post-body strong { font-weight: 600; color: var(--text); }
.post-body em { font-style: italic; }
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.post-body a:hover { color: var(--accent-hover); }
.post-body ul, .post-body ol {
  margin: 8px 0 22px;
  padding-left: 24px;
}
.post-body li { margin-bottom: 10px; }
.post-body li::marker { color: var(--accent); }
.post-body blockquote {
  border-left: 3px solid var(--border-strong);
  padding: 4px 0 4px 22px;
  margin: 28px 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Tweet embed wrapper (keeps Twitter's embed centered + bounded) */
.tweet-wrap {
  display: flex;
  justify-content: center;
  margin: 36px 0;
}
.tweet-wrap .twitter-tweet { max-width: 100% !important; }

/* Sign-off */
.post-signoff {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.signoff-line {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.005em;
}
.signoff-line .accent { color: var(--accent); }

/* Back link */
.post-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.back-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

/* ============================================================
   Mobile
   ============================================================ */

@media (max-width: 600px) {
  h1 { font-size: 40px; }
  .hero { padding: 60px 0 48px; }
  .post-card { padding: 24px; }
  .post-title { font-size: 22px; }
  .signup-form { flex-direction: column; }
  .footer-content { flex-direction: column; gap: 16px; }
  .post-header h1 { font-size: 34px; 