/*
Theme Name: Eli Cross
Theme URI: https://agenticemployee.work
Author: Eli Cross
Author URI: https://agenticemployee.work
Description: Field notes from the 4IR workforce shift. Documenting what happens when you replace office roles with AI employees.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: eli-cross
*/

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg: #0d0d0d;
  --bg2: #141414;
  --bg3: #1c1c1c;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-dim: rgba(245,158,11,0.12);
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1140px;
  --transition: 0.2s ease;
}

[data-theme="light"] {
  --bg: #f4f4ef;
  --bg2: #eaeae4;
  --bg3: #e0e0da;
  --border: #d0d0c8;
  --text: #1a1a1a;
  --text-muted: #666;
  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-dim: rgba(217,119,6,0.1);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg) !important;
  color: var(--text) !important;
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

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

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ─── Layout Utilities ──────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* ─── Site Header ───────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

[data-theme="light"] #site-header {
  background: rgba(244,244,239,0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.site-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-logo:hover { color: var(--text); }
.site-logo .logo-dot { color: var(--accent); }

.header-nav { display: flex; align-items: center; gap: 1.5rem; }
.header-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--text); }

.theme-toggle {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.toggle-icon { font-size: 0.9rem; }

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(245,158,11,0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.75rem;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 { margin-bottom: 1.5rem; color: var(--text); }
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent) !important;
  color: #0d0d0d !important;
}
.btn-primary:hover, .btn-primary:visited, .btn-primary:active, .btn-primary:focus {
  background: var(--accent-hover) !important;
  color: #0d0d0d !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245,158,11,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ─── Stats Bar ─────────────────────────────────────────────── */
.stats-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-number .loading { font-size: 1.5rem; opacity: 0.5; }

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: #22c55e;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}
.stat-live::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

/* ─── Experiment Section ────────────────────────────────────── */
.experiment-section { background: var(--bg); }

.experiment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.experiment-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.experiment-text h2 { margin-bottom: 1.25rem; }
.experiment-text p { color: var(--text-muted); font-size: 1rem; margin-bottom: 1rem; }

.terminal-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.terminal-header {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-dot.red { background: #ff5f57; }
.t-dot.yellow { background: #febc2e; }
.t-dot.green { background: #28c840; }
.terminal-title { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.5rem; font-family: var(--font-mono); }

.terminal-body { padding: 1.5rem; font-family: var(--font-mono); font-size: 0.825rem; line-height: 1.9; }
.t-prompt { color: var(--accent); }
.t-cmd { color: var(--text); }
.t-out { color: #22c55e; }
.t-comment { color: var(--text-muted); }
.t-cursor { display: inline-block; width: 8px; height: 1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ─── For Home Services ─────────────────────────────────────── */
.services-section { background: var(--bg2); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition);
}
.service-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.service-icon {
  width: 48px; height: 48px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.service-card h3 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.service-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

/* ─── CTA Sections ──────────────────────────────────────────── */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.cta-card {
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.cta-card.primary {
  background: var(--accent);
  color: #0d0d0d;
}
.cta-card.primary .cta-label,
.cta-card.primary p,
.cta-card.primary h3 { color: #0d0d0d; }
.cta-card.primary a,
.cta-card.primary a:visited,
.cta-card.primary a:hover { color: #0d0d0d !important; }
.cta-card.primary .btn-dark,
.cta-card.primary .btn-dark:visited,
.cta-card.primary .btn-dark:hover { background: #0d0d0d !important; color: var(--accent) !important; }

.cta-card.secondary {
  background: var(--bg2);
  border: 1px solid var(--border);
}

.cta-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: block;
}
.cta-card.primary .cta-label { color: rgba(0,0,0,0.6); }

.cta-card h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.cta-card p { font-size: 0.9rem; margin-bottom: 1.5rem; opacity: 0.8; }

.btn-dark {
  background: #0d0d0d !important;
  color: var(--accent) !important;
}
.btn-dark:hover, .btn-dark:visited { background: #1a1a1a !important; color: var(--accent) !important; transform: translateY(-1px); }

/* ─── Latest Articles ───────────────────────────────────────── */
.articles-section { background: var(--bg); }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.article-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.article-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.article-thumb {
  aspect-ratio: 16/9;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
  overflow: hidden;
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }

.article-body { padding: 1.5rem; }
.article-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.article-tag {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-card h3 { font-size: 1rem; line-height: 1.4; margin-bottom: 0.75rem; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--accent); }
.article-excerpt { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

.articles-cta { text-align: center; }

/* ─── About Eli ─────────────────────────────────────────────── */
.about-section { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 860px;
  margin: 0 auto;
}

.about-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--bg3);
  border: 3px solid var(--accent);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.about-text .about-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.about-text .about-title {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}
.about-text p { color: var(--text-muted); font-size: 0.95rem; }

/* ─── Footer ────────────────────────────────────────────────── */
#site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand { font-size: 0.9rem; color: var(--text-muted); }
.footer-brand strong { color: var(--text); }

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* ─── Blog / Archive ────────────────────────────────────────── */
.page-header {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { color: var(--text-muted); }

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  padding: 4rem 0;
}

.blog-posts { display: flex; flex-direction: column; gap: 2rem; }

.post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition);
}
.post-card:hover { border-color: var(--accent); }

.post-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; display: flex; gap: 1rem; }
.post-tag { color: var(--accent); font-weight: 600; }
.post-card h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--accent); }
.post-card .excerpt { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.read-more { font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.read-more:hover { color: var(--accent-hover); }

.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.widget {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.widget-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 1rem; }

/* ─── Single Post ───────────────────────────────────────────── */
.single-post { padding: 4rem 0; }
.post-header { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.post-header .post-meta { margin-bottom: 1rem; }
.post-header h1 { margin-bottom: 1.25rem; }
.post-header .post-subtitle { font-size: 1.15rem; color: var(--text-muted); }

.post-content { max-width: 740px; }
.post-content h2, .post-content h3 { margin: 2rem 0 1rem; }
.post-content p { color: var(--text-muted); margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { color: var(--text-muted); padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg3);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}
.post-content pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}
.post-content pre code { background: none; padding: 0; color: var(--text); }
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat-item:nth-child(2) { border-right: none; }
  .experiment-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .blog-layout { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .about-avatar { margin: 0 auto; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .header-nav a { display: none; }
  h1 { font-size: 2rem; }
}
