/* Modern UI Update for Chris Lambert's Site */

:root {
  --primary-color: #8b5cf6;
  --primary-hover: #7c3aed;
  --secondary-color: #38c5c5;
  --text-dark: #1f2937;
  --text-light: #9ca3af;
  --text-on-dark: #e5e7eb;
  --bg-light: #f9fafb;
  --bg-white: rgba(17, 17, 27, 0.95);
  --bg-sidebar: rgba(10, 10, 15, 0.95);
  --bg-card: rgba(20, 20, 30, 0.90);
  --border-color: rgba(139, 92, 246, 0.3);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  color: var(--text-on-dark);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

#wrapper {
  min-height: 100vh;
  display: flex;
}

/* Modern Sidebar */
#sidebar {
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  padding: 2rem 1.5rem;
  color: var(--text-on-dark);
  box-shadow: var(--shadow-xl);
  border-right: 1px solid var(--border-color);
  z-index: 1000;
  overflow-y: auto;
}

#sidebar a {
  color: var(--text-on-dark);
  text-decoration: none;
  transition: all 0.3s ease;
}

#site-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

#site-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  transition: all 0.3s ease;
  color: var(--text-on-dark);
}

#site-title:hover {
  color: #a78bfa;
  transform: translateX(4px);
}

#site-title i {
  color: var(--secondary-color);
  margin-right: 0.5rem;
}

#site-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  margin: 0;
  padding: 0;
  font-weight: 400;
}

/* Modern Navigation */
#nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

#nav-links li {
  margin: 0.5rem 0;
}

#nav-links a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  color: var(--text-on-dark);
}

#nav-links a:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* Main Content Area */
#post-container {
  margin-left: 280px;
  padding: 2rem;
  width: calc(100% - 280px);
  max-width: 900px;
}

#post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Modern Post Cards */
.post-entry {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.post-entry:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(139, 92, 246, 0.5);
}

.entry-header {
  margin-bottom: 1.5rem;
}

.entry-header a {
  color: var(--text-on-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.entry-header a:hover {
  color: #a78bfa;
}

.entry-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0;
  line-height: 1.3;
  color: var(--text-on-dark);
}

.post-time {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Social Share Icons */
.entry-header a[id^="fb"],
.entry-header a[id^="tw"],
.entry-header a[id^="li"],
.entry-header a[id^="hn"],
.entry-header a[id^="rd"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0.5rem 0.25rem 0 0;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.entry-header a[id^="fb"]:hover { background: #1877f2; border-color: #1877f2; }
.entry-header a[id^="tw"]:hover { background: #1da1f2; border-color: #1da1f2; }
.entry-header a[id^="li"]:hover { background: #0a66c2; border-color: #0a66c2; }
.entry-header a[id^="hn"]:hover { background: #ff6600; border-color: #ff6600; }
.entry-header a[id^="rd"]:hover { background: #ff4500; border-color: #ff4500; }

/* Post Content */
.post-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-on-dark);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-on-dark);
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }
.post-content h4 { font-size: 1.125rem; color: var(--text-light); }

.post-content a {
  color: #a78bfa;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.post-content a:hover {
  border-bottom-color: #a78bfa;
}

.post-content img {
  display: block;
  margin: 2rem auto;
  max-width: 100%;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
}

.post-content blockquote {
  border-left: 4px solid #a78bfa;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
  background: rgba(139, 92, 246, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
}

.post-content pre {
  background: rgba(0, 0, 0, 0.5);
  color: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.post-content code {
  background: rgba(139, 92, 246, 0.2);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "Monaco", "Courier New", monospace;
  color: #e9d5ff;
}

.post-content pre code {
  background: transparent;
  padding: 0;
  color: #f9fafb;
}

.post-content ul,
.post-content ol {
  color: var(--text-on-dark);
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin: 0.5rem 0;
}

/* Paginator */
.paginator {
  text-align: center;
  padding: 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-on-dark);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.paginator a {
  color: #a78bfa;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.paginator a:hover {
  background: rgba(139, 92, 246, 0.3);
}

/* Footer */
#site-info {
  margin-top: 3rem;
  padding: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-light);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

#site-info a {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 500;
}

#site-info a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media only screen and (max-width: 1024px) {
  #sidebar {
    width: 240px;
  }
  
  #post-container {
    margin-left: 240px;
    width: calc(100% - 240px);
  }
}

@media only screen and (max-width: 768px) {
  body {
    background: var(--bg-light);
  }

  #wrapper {
    flex-direction: column;
  }

  #sidebar {
    position: static;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
  }

  #site-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
  }

  #site-title {
    font-size: 1.5rem;
  }

  #nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  #nav-links li {
    margin: 0;
  }

  #nav-links a {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  #post-container {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }

  .post-entry {
    padding: 1.5rem;
  }

  .entry-header h1 {
    font-size: 1.5rem;
  }

  .post-content {
    font-size: 1rem;
  }
}

@media only screen and (max-width: 480px) {
  #sidebar {
    padding: 1rem;
  }

  #site-title {
    font-size: 1.25rem;
  }

  #site-desc {
    font-size: 0.875rem;
  }

  #nav-links a {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
  }

  .post-entry {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .entry-header h1 {
    font-size: 1.25rem;
  }

  .post-content {
    font-size: 0.9375rem;
  }

  .post-content pre {
    padding: 1rem;
    font-size: 0.8125rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-entry {
  animation: fadeIn 0.6s ease-out;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  #sidebar {
    display: none;
  }

  #post-container {
    margin-left: 0;
    width: 100%;
  }

  .post-entry {
    box-shadow: none;
    border: 1px solid var(--border-color);
    page-break-inside: avoid;
  }
}
