/* ============================================
   Steven Edge — Portfolio & Blog
   Dark refined theme / automation + finance brand
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #09090b;
  --bg-secondary: #0f0f12;
  --bg-card: #13131a;
  --bg-card-hover: #1a1a24;
  --border: #1e1e2a;
  --border-hover: #2a2a3a;
  --accent: #00cc7a;
  --accent-dim: rgba(0, 204, 122, 0.12);
  --accent-glow: rgba(0, 204, 122, 0.06);
  --text-primary: #ececf1;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1080px;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover { opacity: 0.8; }

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

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text-primary); opacity: 1; }

.nav__cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--bg-primary) !important;
  background: var(--accent);
  padding: 8px 20px;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav__cta:hover {
  opacity: 1 !important;
  box-shadow: 0 0 20px var(--accent-dim);
}

/* Mobile nav */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

/* ---- Hero ---- */
.hero {
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
  border: 1px solid rgba(0, 204, 122, 0.15);
}

.hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text-primary);
}

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

.hero__sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn--primary:hover {
  box-shadow: 0 0 24px var(--accent-dim);
  opacity: 1;
}

.btn--secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-hover);
}

.btn--secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  opacity: 1;
}

/* ---- Section ---- */
.section {
  padding: 80px 0;
}

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

.section__title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section__desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 48px;
}

.section--bordered {
  border-top: 1px solid var(--border);
}

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
}

.stat {
  background: var(--bg-card);
  padding: 28px 24px;
  text-align: center;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat__label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Project Cards ---- */
.projects {
  display: grid;
  gap: 16px;
}

.project {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
}

.project:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.project__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 16px;
}

.project__name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project__badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  flex-shrink: 0;
}

.badge--live {
  color: var(--accent);
  background: var(--accent-dim);
}

.badge--dev {
  color: #f5a623;
  background: rgba(245, 166, 35, 0.12);
}

.project__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ---- Examples Grid (What I Automate) ---- */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.example {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
}

.example:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.example__icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.example__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.example__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Services ---- */
.services {
  display: grid;
  gap: 12px;
}

.service {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  transition: border-color 0.2s;
  gap: 16px;
}

.service:hover {
  border-color: var(--border-hover);
}

.service__name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.service__detail {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.service__price {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

/* ---- Skills Grid ---- */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 6px;
  transition: border-color 0.2s;
}

.skill:hover {
  border-color: var(--border-hover);
}

/* ---- Blog Cards ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.blog-card__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-card__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.blog-card__excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-card__link {
  color: var(--text-primary);
  text-decoration: none;
}

.blog-card__link:hover { opacity: 1; }

/* ---- Blog Post ---- */
.post {
  padding: 80px 0;
}

.post__meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.post__meta span { color: var(--border-hover); }

.post__title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 32px;
}

.post__body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post__body h2 {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}

.post__body h3 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin: 36px 0 12px;
}

.post__body p {
  margin-bottom: 20px;
}

.post__body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.post__body code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

.post__body pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 24px 0;
  overflow-x: auto;
}

.post__body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
}

.post__body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--accent-glow);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post__body ul, .post__body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.post__body li {
  margin-bottom: 8px;
}

.post__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 48px;
  transition: color 0.2s;
}

.post__back:hover { color: var(--accent); opacity: 1; }

/* ---- CTA Section ---- */
.cta {
  padding: 80px 0;
  text-align: center;
}

.cta__box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

.cta__box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
}

.cta__desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__text {
  font-size: 13px;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer__links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer__links a:hover { color: var(--text-secondary); opacity: 1; }

/* ---- Animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }
  .nav__toggle { display: block; }

  .hero { padding: 60px 0; }
  .hero h1 { font-size: 32px; }
  .hero__sub { font-size: 16px; }

  .stats { grid-template-columns: repeat(2, 1fr); }

  .examples-grid { grid-template-columns: 1fr; }

  .service { flex-direction: column; align-items: flex-start; }

  .blog-grid { grid-template-columns: 1fr; }

  .cta__box { padding: 40px 24px; }

  .footer__inner { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}
