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

:root {
  --primary-bg: #1e293b;
  --primary-color: #38bdf8;
  --secondary-color: #94a3b8;
  --text-color: #f1f5f9;
  --overlay: rgba(15, 23, 42, 0.6);
}

body {
  font-size: 1rem;
  font-family: 'Segoe UI', sans-serif;
  background-image: url('../img/workstation.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-color);
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.3;
}

h2 {
  font-size: 2rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.3;
}

p {
  font-size: 1.1rem;
  line-height: 1.7;
}

.card-date,
.post-meta,
.footer-legal p {
  font-size: 0.9rem;
  color: var(--secondary-color);
}

.noscript-warning {
  background-color: var(--primary-bg);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  padding: 1.5rem;
  margin: 2rem auto;
  border-radius: 8px;
  font-size: 1rem;
  max-width: 700px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  p {
    font-size: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

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

  .post-list {
    padding: 0 1rem;
  }

  .content-box {
    padding: 1rem;
  }

  .blog-post {
    padding: 0;
  }

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-color: var(--overlay);
  z-index: -1;
}

main {
  flex: 1;
  padding-bottom: 6rem;
}

nav {
  background-color: var(--primary-bg);
  padding: 1rem;
  text-align: center;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

nav a:hover,
nav a:focus {
  text-decoration: underline;
  outline: none;
}

.hero {
  min-height: 320px;
  padding: 2.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-color);
}

.hero-overlay {
  background-color: var(--overlay);
  padding: 3rem 1.5rem;
  border-radius: 12px;
  max-width: 700px;
  margin: 0 auto;
}

.hero-content {
  max-width: 700px;
}

.hero-content h1 {
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--primary-color);
}

.hero-content p {
  line-height: 1.7;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.btn {
  background-color: var(--primary-color);
  color: var(--primary-bg);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover,
.btn:focus {
  background-color: #1e90d6;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  outline: none;
}

.blog-section {
  text-align: center;
}

.blog-section h2 {
  margin-bottom: 2.5rem;
  color: var(--primary-color);
}

.posts-container {
  max-width: 800px;
  margin: 0 auto;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.posts-grid:has(.card:only-child) {
  justify-content: center;
}

.card {
  background-color: var(--primary-bg);
  padding: 2rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
}

.card:hover,
.card:focus {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  outline: none;
}

.card h3 {
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.card p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

footer {
  background-color: var(--primary-bg);
  padding: 1rem;
  text-align: center;
}

.content-page {
  padding: 3rem 1.5rem;
}

.content-box {
  background-color: var(--primary-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.content-page h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.post-intro {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

.content-page p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.page-header {
  padding: 3rem 1.5rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--overlay);
  border-radius: 12px;
  z-index: -1;
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  line-height: 1.3;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #cbd5e1;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

.post-list {
  max-width: 700px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0 1.5rem;
}

.post-item {
  background-color: var(--primary-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-item:hover,
.post-item:focus {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  outline: none;
}

.post-item h2 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

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

.post-item p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.post-item a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.blog-post {
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 2rem;
  line-height: 1.6;
}

.blog-post p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.blog-post h2 {
  font-size: 1.4rem;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  font-weight: 600;
}

.blog-post ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.blog-post li {
  margin: 0.25rem 0;
}

.post-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.post-paragraph {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color);
}

pre {
  background-color: #162032;
  color: #38bdf8;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #38bdf8 #162032;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid #1e293b;
  margin-bottom: 2.5rem;
}

pre::-webkit-scrollbar {
  height: 12px;
}

pre::-webkit-scrollbar-track {
  background: #162032;
  border-radius: 8px;
}

pre::-webkit-scrollbar-thumb {
  background-color: #38bdf8;
  border-radius: 8px;
  border: 3px solid #162032;
}

code {
  background-color: #162032;
  color: #38bdf8;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

h1+pre,
h2+pre,
h3+pre {
  margin-top: 1.5rem;
}

.post-image {
  margin: 2rem 0;
  text-align: center;
}

.post-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-image figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #64748b;
}