/* Giuseppe Urso Blog - Debian, Free Software, Music
   Inspired by the historical giuseppeurso.net blog */

:root {
  --primary: #c0392b;
  --primary-dark: #922b21;
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --border: #ecf0f1;
  --code-bg: #282c34;
  --code-text: #abb2bf;
  --link: #c0392b;
  --tag-bg: #ecf0f1;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 3px solid var(--primary);
  padding: 1.5rem 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.site-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--text);
  letter-spacing: -0.5px;
}
.site-title a { color: var(--text); text-decoration: none; }
.site-title span { color: var(--primary); }

.site-tagline {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-decoration: none;
}

/* Layout */
.site-main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
}

/* Posts */
.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.post-header { margin-bottom: 1.25rem; }

.post-title {
  font-size: 1.6rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--primary); text-decoration: none; }

.post-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-meta a { color: var(--text-light); }
.post-meta a:hover { color: var(--primary); }

.post-content { margin-bottom: 1rem; }
.post-content p { margin-bottom: 1rem; }
.post-content h2, .post-content h3 { margin: 1.5rem 0 0.75rem; }

.post-content pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1rem 0;
}
.post-content code {
  font-family: 'Consolas', 'Monaco', monospace;
  background: var(--tag-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}
.post-content pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.post-content ul, .post-content ol {
  margin: 1rem 0 1rem 2rem;
}
.post-content li { margin-bottom: 0.5rem; }

.read-more {
  display: inline-block;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-top: 0.5rem;
}
.read-more:hover { color: var(--primary-dark); }

.post-tags { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--text-light);
  font-size: 0.75rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tag:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* Sidebar */
.sidebar { font-size: 0.9rem; }

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 0.95rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.widget ul { list-style: none; }
.widget li {
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--border);
}
.widget li:last-child { border-bottom: none; }
.widget li a { color: var(--text); font-size: 0.88rem; }
.widget li a:hover { color: var(--primary); }

.tag-cloud .tag { margin-bottom: 0.5rem; }

/* About widget */
.about-widget {
  text-align: center;
}
.about-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
.about-widget p {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  background: #2c3e50;
  color: #bdc3c7;
  padding: 2rem 0;
  margin-top: 3rem;
  font-size: 0.85rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-inner h4 {
  color: #ecf0f1;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}
.footer-inner ul { list-style: none; }
.footer-inner li { margin-bottom: 0.4rem; }
.footer-inner a { color: #bdc3c7; }
.footer-inner a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #34495e;
  margin-top: 1.5rem;
  padding-top: 1rem;
  text-align: center;
  color: #7f8c8d;
  font-size: 0.8rem;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  gap: 1rem;
}
.post-nav a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
  flex: 1;
}
.post-nav a:hover { border-color: var(--primary); text-decoration: none; }
.post-nav .prev { text-align: left; }
.post-nav .next { text-align: right; }
.post-nav .nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  display: block;
  margin-bottom: 0.25rem;
}

/* Archive / Categories */
.archive-list { list-style: none; }
.archive-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.archive-list .post-date {
  font-size: 0.8rem;
  color: var(--text-light);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  white-space: nowrap;
}

.category-group { margin-bottom: 2rem; }
.category-group h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
  .site-main {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-direction: column;
    text-align: center;
  }
  .site-nav ul { justify-content: center; }
}
