/* Unified Site Styles */
body {
  font-family: 'Nunito', sans-serif;
  margin: 0;
  background-color: #ffffff;
  color: #222;
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}
body.dark-mode {
  background-color: #121212;
  color: #eee;
}

.outer-card {
  max-width: 900px;
  margin: 2rem auto;
  background: white;
  border-radius: 16px;
  padding: 1rem 2rem;
  border: 1px solid #ddd;
  overflow: hidden; 
}
.dark-mode .outer-card {
  background: #1a1a1a;
  border-color: #444;
}

/* Header Styles */
header.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}
.dark-mode header.site-header {
  background: inherit;
}

hr.header-divider {
  border: none;
  height: 1px;
  background-color: #e5e7eb;
  margin: 0.75rem -2rem 1.25rem;
}
.dark-mode hr.header-divider {
  background-color: #374151;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  color: inherit;
}
.nav-links a.active {
  color: #007bff;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle-btn {
  background: none;
  border: 1px solid transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0.5rem;
  border-radius: 50%;
  line-height: 1;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.dark-mode .theme-toggle-btn {
  color: #9ca3af;
}
.theme-toggle-btn:hover {
  color: #111827;
  background-color: #f3f4f6;
}
.dark-mode .theme-toggle-btn:hover {
  color: #f3f4f6;
  background-color: #374151;
}
.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: inherit;
  z-index: 1001;
}

.hamburger-icon {
  width: 24px;
  height: 18px;
  position: relative;
}
.hamburger-icon .line {
  display: block;
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: #6b7280;
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}
body.dark-mode .hamburger-icon .line {
  background-color: #9ca3af;
}
.hamburger-icon .line-1 { top: 0; }
.hamburger-icon .line-2 { top: 50%; transform: translateY(-50%); width: 60%; }
.hamburger-icon .line-3 { bottom: 0; }
.hamburger-icon.open .line-1 { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger-icon.open .line-2 { opacity: 0; }
.hamburger-icon.open .line-3 { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}
.profile-media-container {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.profile-media-container img,
.profile-media-container video {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.profile-media-container video {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.profile-media-container.playing video {
  opacity: 1;
}
.profile-media-container.playing img {
  opacity: 0;
}
.hero h1 {
  margin-bottom: 0.5rem;
}
.hero p {
  color: #666;
  text-align: left;
}
.dark-mode .hero p {
  color: #999;
}

/* Now Section */
.now {
  background: transparent;
  border-radius: 12px;
  margin-bottom: 3rem;
}
.dark-mode .now {
  background: transparent;
}
.now h2 {
  margin-bottom: 0.5rem;
}

/* Cards */
.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 2rem;
}
.card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dark-mode .card {
  background: #2a2a2a;
  border-color: #444;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.dark-mode .card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}
.app-icon.golok-icon {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 52px;
  height: 52px;
}
.dark-mode .app-icon.golok-icon {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.card h3 {
  margin: 0;
  font-size: 1.25rem;
}
.card h3 a {
  color: inherit;
  text-decoration: none;
}
.card h3 a:hover {
  color: #007bff;
}
.card p {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.dark-mode .card p {
  color: #bbb;
}
.card a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}
.card a:hover {
  text-decoration: underline;
}

/* Connect Section */
.connect {
  text-align: left;
  margin-top: 3rem;
}
.social-icons {
  margin-bottom: 1rem;
}
.social-icons a {
  margin: 0 10px;
  color: inherit;
  font-size: 1.4rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.social-icons a:hover {
  color: #007bff;
}
.bmc-button {
  display: inline-block;
  margin-top: 1rem;
}
.brand-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}
.dark-mode .brand-icon {
  filter: invert(1);
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.875rem;
  color: #999;
  margin-top: 3rem;
}

/* Blog Specific Styles */
.back-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 2rem;
  display: inline-block;
}
.back-link:hover {
  text-decoration: underline;
}

.article-header {
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #666;
}
.dark-mode .article-meta {
  color: #999;
}

.blog-category {
  background: #007bff;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.article-title {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
}

.article-subtitle {
  font-size: 1.125rem;
  color: #666;
  margin-top: 0.5rem;
  line-height: 1.5;
}
.dark-mode .article-subtitle {
  color: #999;
}

.content {
  font-size: 1.125rem;
  line-height: 1.7;
}
.content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
}
.content h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  font-weight: 600;
}
.content h4 {
  font-size: 1.125rem;
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
}
.content h5 {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
  font-weight: 600;
}
.content p {
  margin-bottom: 1.5rem;
}
.content ul, .content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.content li {
  margin-bottom: 0.5rem;
}
.content blockquote {
  border-left: 4px solid #007bff;
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  font-style: italic;
}
.dark-mode .content blockquote {
  background: #2a2a2a;
}
.content code {
  background: #f1f3f4;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}
.dark-mode .content code {
  background: #333;
}

/* Page Header for Writing */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
}
.page-header h1 {
  margin-bottom: 0.5rem;
}
.page-header p {
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}
.dark-mode .page-header p {
  color: #999;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}
.blog-post {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.dark-mode .blog-post {
  background: #2a2a2a;
  border-color: #444;
}
.blog-post:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.dark-mode .blog-post:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Section Headers */
.section-header {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
}

.reading-time {
  color: #6c757d;
  font-weight: 600;
}

.publish-date {
  color: #6c757d;
}

/* Problem/Constraint/Result Cards */
.problem-card, .constraint-card, .result-card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dark-mode .problem-card, .dark-mode .constraint-card, .dark-mode .result-card {
  background: #2a2a2a;
  border-color: #444;
}
.problem-card:hover, .constraint-card:hover, .result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.dark-mode .problem-card:hover, .dark-mode .constraint-card:hover, .dark-mode .result-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.constraint-header, .result-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.constraint-badge, .result-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
}

.constraint-badge.must-have {
  background: #dc3545;
}
.constraint-badge.nice-to-have {
  background: #007bff;
}
.constraint-badge.quality-of-life {
  background: #28a745;
}
.result-badge {
  background: #ffc107;
  color: #000;
}

.constraint-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

/* CTA Section */
.cta-section {
  text-align: center;
  margin: 3rem 0;
}

.cta-button {
  background: #e9ecef;
  color: #495057;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  display: inline-block;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.dark-mode .cta-button {
  background: #495057;
  color: #e9ecef;
}
.cta-button:hover {
  background: #dee2e6;
  transform: translateY(-1px);
}
.dark-mode .cta-button:hover {
  background: #6c757d;
}

.cta-note {
  font-size: 0.875rem;
  margin-top: 1rem;
  color: #6c757d;
}
.dark-mode .cta-note {
  color: #9ca3af;
}

/* Roadmap Specific Styles */
.app-hero {
  text-align: center;
  margin-bottom: 3rem;
}
.app-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  margin: 0 auto 1rem;
  display: block;
}
.app-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 2.5rem;
  font-weight: 700;
}
.app-hero p {
  color: #666;
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}
.dark-mode .app-hero p {
  color: #999;
}
.roadmap-section {
  margin-bottom: 3rem;
}
.roadmap-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
}
.version-card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dark-mode .version-card {
  background: #2a2a2a;
  border-color: #444;
}
.version-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.dark-mode .version-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.version-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.version-badge {
  background: #007bff;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}
.version-badge.current {
  background: #28a745;
}
.version-badge.upcoming {
  background: #ffc107;
  color: #000;
}
.version-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.dark-mode .feature-list li {
  border-bottom-color: #374151;
}
.feature-list li:last-child {
  border-bottom: none;
}
.feature-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.feature-icon.new {
  background: #007bff;
  color: white;
}
.feature-icon.enhancement {
  background: #28a745;
  color: white;
}
.feature-icon.fix {
  background: #ffc107;
  color: #000;
}
.feature-content h4 {
  margin: 0 0 0.25rem;
  font-weight: 600;
  font-size: 1rem;
}
.feature-content p {
  margin: 0;
  color: #666;
  font-size: 0.875rem;
}
.dark-mode .feature-content p {
  color: #999;
}
.eta-badge {
  background: #e9ecef;
  color: #495057;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 1rem;
  display: inline-block;
  text-decoration: none;
}
.dark-mode .eta-badge {
  background: #495057;
  color: #e9ecef;
}
.eta-badge:hover {
  text-decoration: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    background-color: white;
  }
  body.dark-mode {
    background-color: #1a1a1a;
  }
  header.site-header {
    justify-content: space-between;
  }
  .outer-card {
    margin: 0;
    border-radius: 0;
    border: none;
    padding: 1rem;
  }
  hr.header-divider {
    margin-left: -1rem;
    margin-right: -1rem;
  }
  
  .now {
    margin-left: 0;
    margin-right: 0;
  }
  
  #main-nav {
    display: none; 
    position: absolute;
    top: 5rem;
    left: 1rem;
    right: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 0.5rem;
    z-index: 1000;
    flex-direction: column;
    gap: 0.25rem;
  }
  .dark-mode #main-nav {
    background-color: #2a2a2a;
    border: 1px solid #444;
  }
  #main-nav.mobile-nav-open {
    display: flex;
    animation: fadeIn 0.2s ease;
  }
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  #main-nav a {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: background-color 0.2s;
  }
  #main-nav a:hover {
    background-color: #f3f4f6;
  }
  .dark-mode #main-nav a:hover {
    background-color: #374151;
  }

  .mobile-menu-btn {
    display: block;
  }
  
  header.site-header > .desktop-nav {
    display: none;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .app-hero h1 {
    font-size: 2rem;
  }
  .version-card {
    padding: 1.5rem;
  }
}