/* ============================================
   MR. DOUG — Design System
   Spec: Guppi, April 10 2026
   ============================================ */

/* Google Fonts loaded via <link> in BaseLayout.astro head */

/* --- Design Tokens: Light Mode (default) --- */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-hero: #0a0a0a;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #888888;
  --text-hint: #999999;
  --text-faint: #aaaaaa;
  --border-default: #e8e8e8;
  --border-hover: #cccccc;
  --border-light: #f0f0f0;
  --accent-teal: #00c896;
  --accent-teal-hover: #00dba6;
  --accent-blue: #3c82f6;
  --accent-amber: #f59e0b;
  --accent-red: #e24b4a;

  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* --- Design Tokens: Dark Mode --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --text-primary: #e8e8e8;
    --text-secondary: #999999;
    --text-muted: #777777;
    --text-hint: #666666;
    --text-faint: #555555;
    --border-default: #2a2a2a;
    --border-hover: #3a3a3a;
    --border-light: #1e1e1e;
  }
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

/* --- Utility: Mono Label --- */
.mono {
  font-family: var(--font-mono);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* --- Layout Container --- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

/* ============================================
   Navigation
   ============================================ */
.nav {
  border-bottom: 1px solid var(--border-default);
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 100;
}

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

.nav-logo img,
.nav-logo svg {
  height: 32px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .nav-logo img,
  .nav-logo svg {
    height: 28px;
  }
}

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.2px;
  transition: color 0.15s;
}

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

.nav-links a.discord-link {
  color: var(--accent-teal);
}

.nav-links a.discord-link:hover {
  color: var(--accent-teal-hover);
}

/* Mobile menu */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  margin: 4px 0;
  transition: 0.2s;
}

.nav-mobile {
  display: none;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-default);
}

.nav-mobile.open {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--text-primary);
}

.nav-mobile a.discord-link {
  color: var(--accent-teal);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: block;
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: var(--bg-hero);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -50px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(0, 200, 150, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  padding-top: 3.5rem;
  padding-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 34px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  max-width: 560px;
  margin-bottom: 1rem;
}

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

.hero-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  background: var(--accent-teal);
  color: #0a0a0a;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--accent-teal-hover);
}

.btn-secondary {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: border-color 0.15s;
  display: inline-block;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .hero-content {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }
  .hero h1 {
    font-size: 26px;
  }
}

/* ============================================
   Stats Row
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 2rem 0;
}

.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  text-align: center;
  padding: 1.25rem 0.5rem;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-hint);
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   Projects Grid
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.project-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s;
  display: block;
}

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

.project-bar {
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
}

.project-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 6px;
  margin-bottom: 6px;
}

.project-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Now Section
   ============================================ */
.now-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 1.25rem;
}

.now-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.now-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  animation: pulse 2s ease-in-out infinite;
}

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

.now-status-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-teal);
}

.now-body {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   Recent Writing / Blog Rows
   ============================================ */
.writing-list {
  list-style: none;
}

.writing-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: padding-left 0.15s;
}

.writing-row:last-child {
  border-bottom: none;
}

.writing-row:hover {
  padding-left: 6px;
}

.writing-row a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  width: 100%;
}

.writing-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.writing-date {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .writing-row a {
    flex-direction: column;
    gap: 4px;
  }
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border-default);
  background: var(--bg-secondary);
  padding: 1.25rem 0;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-links a.discord-link {
  color: var(--accent-teal);
}

/* ============================================
   Section Spacing
   ============================================ */
.section {
  padding: 2.5rem 0;
}

/* ============================================
   Blog Index (extended rows with description)
   ============================================ */
.blog-row-desc {
  font-size: 13px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
}

/* ============================================
   Blog Post (single)
   ============================================ */
.post-header {
  padding: 2.5rem 0 1.5rem;
}

.post-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

.post-body {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.post-body p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.post-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-body a {
  color: var(--accent-teal);
  text-decoration: none;
}

.post-body a:hover {
  text-decoration: underline;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-body pre {
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.post-body img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1.5rem 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 2rem 0;
}

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

.post-body ul {
  list-style: disc;
}

.post-body ol {
  list-style: decimal;
}

.post-body li {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.post-body blockquote {
  border-left: 3px solid var(--accent-teal);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================
   Page Header (for inner pages)
   ============================================ */
.page-header {
  padding: 2.5rem 0 1.5rem;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
}
