/*
 * Modern Bold Redesign
 * A modern, geometric design with bold colors and clean typography
 */

/* CSS Variables for easy theming */
:root {
  --primary-dark: #1a1a2e;
  --primary-accent: #0f4c75;
  --secondary-accent: #3282b8;
  --highlight: #00d9ff;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-light: #b2bec3;
  --bg-light: #ffffff;
  --bg-subtle: #f8f9fa;
  --bg-card: #ffffff;
  --border-light: #e1e8ed;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

/* Global Resets & Base Styles */
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-subtle);
}

@media (min-width: 48em) {
  html {
    font-size: 18px;
  }
}

body {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Header Navigation */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-accent) 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--highlight) 0%, var(--secondary-accent) 100%);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.site-title a {
  color: white;
  text-decoration: none;
  position: relative;
  display: inline-block;
}

.site-title a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--highlight);
  transition: width 0.3s ease;
}

.site-title a:hover::after {
  width: 100%;
}

.site-tagline {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0.25rem 0 0 0;
  font-weight: 400;
}

.site-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--highlight);
  transition: width 0.3s ease;
}

.site-nav a:hover {
  color: var(--highlight);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.site-nav a.active {
  color: var(--highlight);
}

/* Main Content Container */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.main-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-dark);
  letter-spacing: -0.3px;
}

h1 {
  font-size: 2.5rem;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  position: relative;
  padding-left: 1rem;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3em;
  bottom: 0.3em;
  width: 3px;
  background: linear-gradient(180deg, var(--secondary-accent), var(--highlight));
  border-radius: 2px;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.1rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* Links */
a {
  color: var(--secondary-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--primary-accent);
  text-decoration: underline;
}

/* Post Cards */
.post-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-accent), var(--highlight));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-card:hover::before {
  opacity: 1;
}

.post-card.linked-list {
  background: linear-gradient(135deg, rgba(50, 130, 184, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.post-date {
  font-weight: 600;
}

.post-type-badge {
  background: var(--highlight);
  color: var(--primary-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-title {
  margin: 0 0 1rem 0;
  font-size: 1.75rem;
}

.post-title a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-title a:hover {
  color: var(--secondary-accent);
  text-decoration: none;
}

.linked-list-indicator {
  display: inline-block;
  margin-left: 0.5rem;
  color: var(--highlight);
  font-size: 1.2rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.linked-list-indicator:hover {
  transform: scale(1.2);
}

/* Blockquotes - Geometric Style */
blockquote {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, rgba(50, 130, 184, 0.05) 0%, rgba(0, 217, 255, 0.05) 100%);
  border-left: 4px solid var(--secondary-accent);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: var(--highlight);
  opacity: 0.1;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: normal;
}

/* Code Blocks */
code,
pre {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9rem;
}

code {
  padding: 0.2em 0.4em;
  margin: 0;
  background-color: rgba(50, 130, 184, 0.1);
  border-radius: 4px;
  color: var(--primary-accent);
}

pre {
  display: block;
  margin-top: 0;
  margin-bottom: 2rem;
  padding: 1.5rem;
  line-height: 1.4;
  background-color: var(--primary-dark);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

pre code {
  padding: 0;
  color: #e8e8e8;
  background-color: transparent;
  border-radius: 0;
}

/* Lists */
ul, ol {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

ul {
  list-style-type: none;
}

ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: var(--secondary-accent);
  border-radius: 2px;
  transform: rotate(45deg);
}

ol {
  counter-reset: custom-counter;
  list-style: none;
}

ol li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.5rem;
  counter-increment: custom-counter;
}

ol li::before {
  content: counter(custom-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(135deg, var(--secondary-accent), var(--highlight));
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Strong & Emphasis */
strong {
  font-weight: 700;
  color: var(--primary-dark);
}

em {
  font-style: italic;
  color: var(--text-secondary);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.pagination a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--secondary-accent), var(--highlight));
  color: white;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pagination a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.pagination .pagination-disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Archive Page Styles */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.archive-section {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--secondary-accent);
}

.archive-section h2 {
  margin-top: 0;
  padding-left: 0;
}

.archive-section h2::before {
  display: none;
}

.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.archive-list li:last-child {
  border-bottom: none;
}

.archive-list li::before {
  display: none;
}

.archive-list a {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.archive-list a:hover {
  color: var(--secondary-accent);
  padding-left: 0.5rem;
  text-decoration: none;
}

/* Post Content Styles */
.post-content {
  margin-top: 2rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin: 2rem 0;
}

.post-content hr {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 3rem 0;
}

/* Footer */
.site-footer {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-light);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .content-wrapper {
    padding: 2rem 1rem;
  }

  .post-card {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

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

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 4rem;
}

.mb-4 {
  margin-bottom: 4rem;
}
