/* LinuxDive - Editorial Site */

/* Root Variables */
:root {
  --bg: #0d1117;
  --text: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border: #30363d;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
  margin-bottom: 3rem;
}

.header-nav {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-brand a:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

/* Main Content */
main {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* Footer */
.site-footer-terminal {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 40px 20px;
  font-family: 'Courier New', 'SF Mono', Monaco, monospace;
  border-top: 3px solid #333;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-nav-section {
  flex: 1;
  min-width: 200px;
}

.footer-prompt {
  margin: 0;
  color: #4ec9b0;
  font-weight: bold;
  font-size: 0.95rem;
}

.footer-command {
  color: #fff;
}

.footer-nav {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  color: #ce9178;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #d4a574;
}

.footer-info-section {
  text-align: right;
  flex: 1;
  min-width: 200px;
}

.footer-uptime {
  margin: 0;
  font-size: 0.9em;
  opacity: 0.8;
}

.footer-tagline {
  margin: 5px 0 0;
  font-size: 0.8em;
  color: #888;
}

.footer-copyright {
  max-width: 1000px;
  margin: 20px auto 0;
  border-top: 1px solid #333;
  padding-top: 20px;
  font-size: 0.75em;
  color: #555;
  text-align: center;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

/* Links */
.read-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Sections */
.section-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  margin-top: 3.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
}

.section-title:first-child {
  margin-top: 0;
}

/* Featured Article */
.featured-section {
  margin-bottom: 4rem;
  padding: 2rem;
  background-color: rgba(88, 166, 255, 0.05);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 6px;
}

.featured-image {
  margin: -2rem -2rem 2rem -2rem;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.featured-article {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.featured-article h1 {
  font-size: 2rem;
}

/* Latest Content Section */
.latest-section {
  margin-bottom: 4rem;
}

/* Recommended Reads Section */
.recommended-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background-color: rgba(88, 166, 255, 0.03);
  border-left: 3px solid var(--accent);
}

.recommended-section .section-title {
  border-bottom: 2px solid var(--accent);
}

.recommended-section .article-item {
  padding: 1rem 0;
}
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.article-item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.article-image {
  margin: 0 0 1rem 0;
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--border);
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.article-header h3 {
  margin: 0;
}

.article-header h3 a {
  color: var(--text);
}

.article-header h3 a:hover {
  color: var(--accent);
}

.article-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.article-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.article-excerpt {
  color: var(--text);
  margin-bottom: 0.8rem;
}

/* Pillar Page */
.pillar-page {
  margin-bottom: 3rem;
}

.pillar-intro {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.pillar-intro h1 {
  margin-bottom: 1rem;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.filter-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
}

.pillar-articles {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.category-group {
  display: none;
}

.category-group.active {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pillar-article {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.pillar-article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pillar-article-image {
  margin: 0 0 1rem 0;
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--border);
}

.pillar-article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.tag {
  display: inline-block;
  background-color: rgba(88, 166, 255, 0.1);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

/* Post */
.post {
  margin-bottom: 3rem;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-featured-image {
  margin: 0 0 1.5rem 0;
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--border);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.post-content {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.post-content h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

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

.post-content code {
  background-color: rgba(88, 166, 255, 0.1);
  color: var(--accent);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas,
    "Courier New", monospace;
}

.post-content pre {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.post-content pre code {
  background: transparent;
  color: var(--text);
  padding: 0;
  border-radius: 0;
}

.post-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Page */
.page {
  margin-bottom: 3rem;
}

.page-content {
  font-size: 1rem;
  line-height: 1.8;
}

.page-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.page-content p {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  main {
    padding: 0 1.5rem;
  }

  .header-nav {
    padding: 0 1.5rem;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .nav-links {
    gap: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .article-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-date {
    white-space: normal;
  }

  .category-filter {
    flex-wrap: wrap;
  }

  .footer-content {
    padding: 0 1.5rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  main {
    padding: 0 1rem;
  }

  .header-nav {
    padding: 0 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}
