/* ============================================
   Lisek Engineering — Blog Theme
   Design: Clean, modern, Uber-inspired cards
   ============================================ */

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-primary: #8036b7; /* Lisek purple */
  --color-primary-hover: #7431a7;
  --color-secondary: #ff651a; /* Lisek orange */
  --color-secondary-hover: #fa5200;
  --color-accent: #8036b7;
  --color-accent-hover: #7431a7;
  --color-accent-light: rgba(128, 54, 183, 0.08);
  --color-accent-light-hover: rgba(128, 54, 183, 0.15);
  --color-border: #e8e8e8;
  --color-surface: #f9f9f9;
  --color-code-bg: #f4f4f4;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
  --max-width: 720px;
  --max-width-wide: 1120px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

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

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 2rem;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.site-logo:hover { color: var(--color-text); }
.site-logo .dot { color: var(--color-secondary); }
.site-logo .tech { color: var(--color-primary); }

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.site-nav a:hover,
.site-nav a.active { color: var(--color-text); }

/* ---- Layout ---- */
.container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

/* ---- Home Hero ---- */
.home-hero {
  padding: 2.5rem 2rem 1.5rem;
}

.home-hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.home-hero p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 600px;
}

/* ============================================
   Card Grid — Uber-inspired tiles
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  color: var(--color-text);
  text-decoration: none;
}

.card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  color: var(--color-text);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card:hover .card-image img {
  transform: scale(1.03);
}

.card-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a0a2e, #2d1250);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  font-weight: 500;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-tags {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent);
}

.card-tag + .card-tag::before {
  content: ", ";
  color: var(--color-text-muted);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.card-excerpt {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  flex: 1;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.card-reading-time::before {
  content: "\00B7";
  margin-right: 0.5rem;
}

/* ============================================
   Post Hero Image (article page)
   ============================================ */
.post-hero {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 2rem;
}

.post-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 1.5rem;
}

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

.post-header .tags {
  margin-bottom: 0.75rem;
}

.post-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.post-header .post-meta {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.post-meta time { font-weight: 500; }

.reading-time::before {
  content: "\00B7";
  margin-right: 0.75rem;
}

.post-author {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.post-author a { color: var(--color-text-muted); font-weight: 500; }
.post-author a:hover { color: var(--color-accent); }

/* ============================================
   Share Buttons
   ============================================ */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.share-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-right: 0.25rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  position: relative;
}

.share-btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.share-btn--linkedin:hover { background: #0077b5; border-color: #0077b5; color: #fff; }
.share-btn--x:hover { background: #000; border-color: #000; color: #fff; }
.share-btn--facebook:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-btn--copy:hover { background: var(--color-secondary); border-color: var(--color-secondary); color: #fff; }

.share-btn .copied-label {
  display: none;
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.share-btn.copied .copied-label { display: block; }

/* ---- Tags ---- */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  transition: background 0.15s;
}
.tag:hover { background: var(--color-accent-light-hover); }

/* ---- Article content ---- */
.post-content h2 { font-size: 1.4rem; font-weight: 700; margin: 2.25rem 0 0.75rem; letter-spacing: -0.01em; }
.post-content h3 { font-size: 1.15rem; font-weight: 700; margin: 1.75rem 0 0.5rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin: 0 0 1.25rem 1.25rem; }
.post-content li { margin-bottom: 0.3rem; }

.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.post-content pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.post-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.post-content img {
  border-radius: 6px;
  margin: 1.5rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.post-content th, .post-content td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--color-border);
}

.post-content th {
  font-weight: 600;
  background: var(--color-surface);
}

/* ---- Author card ---- */
.author-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: 8px;
  margin-top: 3rem;
}

.author-card img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-card .author-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.author-card .author-info .author-role {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ---- Tag & Taxonomy pages ---- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-cloud .tag {
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
}

/* ---- Post list (taxonomy/tag pages) ---- */
.post-list {
  list-style: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.post-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.post-item:first-child { padding-top: 0; }
.post-item:last-child { border-bottom: none; }

.post-item h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.post-item h2 a { color: var(--color-text); }
.post-item h2 a:hover { color: var(--color-accent); }

.post-excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem 3rem;
  font-size: 0.9rem;
}

.pagination a { font-weight: 500; }
.pagination .page-info { color: var(--color-text-muted); }

/* ---- Pages (about, etc) ---- */
.page-content h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer a { color: var(--color-text-muted); }
.site-footer a:hover { color: var(--color-accent); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-style: italic;
  margin-top: 0.5rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .container { flex-direction: column; gap: 0.75rem; }
  .site-nav { gap: 1.25rem; }
  .card-grid { grid-template-columns: 1fr; gap: 1rem; }
  .home-hero h1 { font-size: 1.4rem; }
  .post-header h1 { font-size: 1.6rem; }
  .post-hero { padding: 0 1rem; }
  .post-hero img { border-radius: 8px; max-height: 280px; }
  .container-wide { padding: 0 1rem; }
  .author-card { flex-direction: column; align-items: center; text-align: center; }
}
