/* Devon Canup Blog — Dark Personal Brand Theme */
/* Inspired by Dan Koe / Matt Gray / Iman Gadzhi clean minimal style */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --text-primary: #f5f5f5;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent: #c9a84c;
  --accent-hover: #d4b65c;
  --accent-subtle: rgba(201, 168, 76, 0.1);
  --border: #222222;
  --border-light: #2a2a2a;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --content-width: 720px;
  --radius: 12px;
  --transition: 0.2s ease;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p { margin-bottom: 1.5rem; color: var(--text-secondary); }

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

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  background: var(--accent);
  color: var(--bg-primary) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-subtle);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: var(--text-secondary);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: background var(--transition), transform var(--transition);
}
.hero-cta:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

/* ===== FEATURED POST ===== */
.featured-section {
  padding: 4rem 0;
}

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

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.featured-card:hover { border-color: var(--border-light); }

.featured-image {
  aspect-ratio: 16/10;
  background: var(--bg-secondary);
  overflow: hidden;
}
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.featured-card:hover .featured-image img { transform: scale(1.03); }

.featured-content {
  padding: 2.5rem 2.5rem 2.5rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-tag {
  display: inline-block;
  background: var(--accent-subtle);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  width: fit-content;
}

.featured-content h2 {
  margin-bottom: 1rem;
}
.featured-content h2 a { color: var(--text-primary); }
.featured-content h2 a:hover { color: var(--accent); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: auto;
}
.post-meta-sep { opacity: 0.3; }

/* ===== POST GRID ===== */
.posts-section {
  padding: 4rem 0 6rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.post-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

.post-card-image {
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  overflow: hidden;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.03); }

.post-card-body {
  padding: 1.5rem;
}

.post-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}
.post-card-body h3 a { color: var(--text-primary); }
.post-card-body h3 a:hover { color: var(--accent); }

.post-card-body p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== NEWSLETTER CTA ===== */
.newsletter-section {
  padding: 6rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.newsletter-section h2 { margin-bottom: 1rem; }
.newsletter-section > p {
  max-width: 500px;
  margin: 0 auto 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
}
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { border-color: var(--accent); }

.newsletter-form button {
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--accent-hover); }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

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

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--text-primary); }

/* ===== BLOG POST PAGE ===== */
.post-header {
  padding: 8rem 0 3rem;
  text-align: center;
}

.post-header .post-tag { margin: 0 auto 1rem; }

.post-header h1 {
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.post-header .post-meta {
  justify-content: center;
}

.post-hero-image {
  max-width: 900px;
  margin: 0 auto 3rem;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-card);
}
.post-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article content */
.post-content {
  padding: 0 0 4rem;
}

.post-content h2 {
  margin: 3rem 0 1.25rem;
  padding-top: 1rem;
}

.post-content h3 {
  margin: 2rem 0 1rem;
}

.post-content p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--accent-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content blockquote p {
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 0;
}

.post-content ul, .post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}
.post-content li { margin-bottom: 0.75rem; line-height: 1.7; }

.post-content strong { color: var(--text-primary); }

.post-content code {
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Author box */
.author-box {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 4rem 0;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-secondary);
  flex-shrink: 0;
  overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }

.author-info h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.author-info p {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

/* ===== ABOUT PAGE ===== */
.about-hero {
  padding: 10rem 0 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-hero-text h1 { margin-bottom: 1.5rem; }
.about-hero-text p { font-size: 1.1rem; }

.about-image {
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }

.about-section {
  padding: 4rem 0;
}

.about-section h2 { margin-bottom: 1.5rem; }

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

.stat-card {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-4px);
}

.timeline-year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.timeline-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.timeline-item p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-content {
    padding: 2rem;
  }
  .about-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }

  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    gap: 1rem;
  }

  .hero { padding: 8rem 0 4rem; }

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

  .newsletter-form {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .about-hero { padding: 8rem 0 3rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 2rem; }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Table of Contents */
.toc-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 0 auto 2rem;
}
.toc-wrapper h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.toc-list {
  list-style: none;
  padding: 0;
}
.toc-list li { margin-bottom: 0.5rem; }
.toc-list a {
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: color var(--transition);
}
.toc-list a:hover { color: var(--accent); }

/* Share Buttons */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
  margin: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.share-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-right: 0.25rem;
}
.share-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: all var(--transition);
}
.share-btn:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}
