/* MykolaAleksandrov.dev Blog Styles */
:root {
  --text: #222;
  --muted: #5b6b7a;
  --bg: #fff;
  --card: #f7f9fb;
  --accent: #2c7be5;
  --ok: #2bb673;
  --warn: #ffb020;
  --bad: #e55353;
  --code: #f3f5f7;
  --border: #e4ebf3;
  --header-bg: rgba(255, 255, 255, 0.95);
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 1rem 0;
}

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

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

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

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Main content */
.main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 200px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: #1e2a35;
  line-height: 1.25;
  margin: 0 0 1rem 0;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin: 2rem 0 1rem 0;
}

h3 {
  font-size: 1.5rem;
  margin: 1.5rem 0 0.75rem 0;
}

p {
  margin: 0.75rem 0;
}

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

a:hover {
  text-decoration: underline;
}

/* Code */
code {
  background: var(--code);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

pre {
  background: var(--code);
  border-radius: 8px;
  padding: 1rem;
  overflow: auto;
  margin: 1rem 0;
}

pre code {
  background: transparent;
  padding: 0;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

/* Post list */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.post-item:last-child {
  border-bottom: none;
}

.post-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.post-title a {
  color: inherit;
  text-decoration: none;
}

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

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

.post-excerpt {
  color: var(--muted);
  margin-bottom: 1rem;
}

.post-hero {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  float: left;
  margin-right: 1rem;
}

/* Archive */
.archive-list {
  list-style: none;
  padding: 0;
}

.archive-year {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem 0;
  color: var(--accent);
}

.archive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.archive-date {
  color: var(--muted);
  font-size: 0.9rem;
  min-width: 100px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #1e5bb8;
  text-decoration: none;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

/* Footer */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text);
  color: white;
  padding: 1rem;
  display: none;
  z-index: 1000;
}

.cookie-banner.show {
  display: block;
}

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

.cookie-text {
  flex: 1;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

.cookie-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.cookie-accept {
  background: var(--accent);
  color: white;
}

.cookie-decline {
  background: transparent;
  color: white;
  border: 1px solid white;
}

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

  .nav {
    gap: 1rem;
  }

  .main {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .post-hero {
    width: 48px;
    height: 48px;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--muted);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
