/* Progress Hugo Theme */

:root {
  --teal: #0E92C9;
  --teal-soft: #0A7BA5;
  --bg: linear-gradient(180deg, #05060a, #0c0f16);
  --bg-solid: #0c0f16;
  --card: #0f1118;
  --text: #eef2f7;
  --muted: #b8c0cc;
  --border: #1b1f2b;
  --max-width: 800px;
  --max-width-wide: 1200px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-solid: #ffffff;
    --card: #f5f7fb;
    --text: #0b0c10;
    --muted: #4b5563;
    --border: #e5e7eb;
  }
  .card, .review, .post-card { box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); }
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--teal); text-decoration: none; transition: color 120ms ease; }
a:hover { color: var(--teal-soft); }

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

h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max-width); margin: 0 auto; }
.wrap-wide { max-width: var(--max-width-wide); }

section { padding: 40px 20px; }

/* Site Header */
.site-header { padding: 20px; background: var(--bg-solid); border-bottom: 1px solid var(--border); }
.site-header .wrap { max-width: var(--max-width-wide); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-link { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand-link:hover { color: var(--text); }
.logo { width: 40px; height: 40px; border-radius: 10px; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 14px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* Homepage Header / Hero */
header {
  padding: 80px 20px 0px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0E92C9, #0A7BA5);
  color: #ffffff;
}

.hero { display: flex; flex-direction: column; gap: 28px; align-items: center; text-align: center; }

.hero-figure { position: relative; display: flex; justify-content: center; align-items: center; isolation: isolate; }

.brand { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 700; color: #ffffff; }

.brand .icon-frosted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.brand .icon-frosted img { width: 92px; height: 92px; border-radius: 20px; }

.brand .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #e6f4ff;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
}

.title { font-size: clamp(38px, 6vw, 64px); line-height: 1.08; margin: 6px 0 6px; color: #ffffff; }

.hero-shot { position: relative; padding: 0; border-radius: 24px; background: none; border: none; z-index: 1; }

/* CTA Elements */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }

.app-badge {
  display: inline-block;
  border-radius: 14px;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 12px 40px rgba(0, 122, 255, 0.35);
}

.app-badge:hover { transform: translateY(-1px); box-shadow: 0 16px 48px rgba(0, 122, 255, 0.42); }
.app-badge:active { transform: translateY(0); box-shadow: 0 10px 32px rgba(0, 122, 255, 0.3); }
.app-badge img { height: 6em; width: auto; display: block; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  transition: background 120ms ease, transform 120ms ease;
}

.btn:hover { background: var(--teal-soft); color: #fff; transform: translateY(-1px); }

.ghost {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #e6f4ff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
}

/* Grid & Cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

h2 { margin: 0 0 18px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; text-align: center; }

.card { padding: 18px; border-radius: 0; background: transparent; border: none; box-shadow: none; }

.card h3 { margin: 0 0 10px; font-size: 18px; display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.card h3 a { color: inherit; }
.card h3 a:hover { color: var(--teal); }
.card p { margin: 0; color: var(--muted); line-height: 1.6; }

/* Reviews */
.reviews { column-width: 280px; column-gap: 18px; max-width: var(--max-width); margin: 0 auto; }

.rating-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: -6px 0 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.rating-row .stars { display: inline-flex; align-items: center; justify-content: center; color: #ffd166; line-height: 1; }
.rating-row .stars svg { height: 28px; width: auto; display: block; }

.review { padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); break-inside: avoid; margin: 0 0 16px; }

.review blockquote { position: relative; margin: 0 0 12px; padding: 22px 14px 0; color: var(--muted); line-height: 1.65; font-size: 16px; }

.review blockquote::before {
  content: "\201C";
  position: absolute;
  top: -6px;
  left: -2px;
  font-size: 56px;
  line-height: 1;
  opacity: 0.28;
  color: var(--text);
  pointer-events: none;
}

.review .name { font-weight: 700; color: var(--text); }
.review .name::after { content: " \2605\2605\2605\2605\2605"; color: #ffd166; }

/* Content / Blog */
.content { max-width: 65ch; margin: 0 auto; padding: 0 20px; }
.content h1, .content h2, .content h3, .content h4 { margin-top: 1.5em; }
.content h1:first-child, .content h2:first-child { margin-top: 0; }
.content a { text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.content img { border-radius: 12px; margin: 1.5em 0; }
.content blockquote { margin: 1.5em 0; padding: 0 0 0 1.5em; border-left: 3px solid var(--teal); color: var(--muted); font-style: italic; }
.content pre { padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); overflow-x: auto; }
.content code { font-family: "SF Mono", Monaco, Consolas, monospace; font-size: 0.9em; }
.content :not(pre) > code { padding: 2px 6px; border-radius: 4px; background: var(--card); }

/* Article / Single Post */
.article-header { padding: 60px 0 40px; background: linear-gradient(180deg, #0E92C9, #0A7BA5); color: #fff; text-align: center; margin-bottom: 40px; }
.article-title { font-size: clamp(28px, 5vw, 48px); line-height: 1.1; margin: 0 0 16px; }
.article-meta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; color: rgba(255, 255, 255, 0.8); font-size: 14px; }

.featured-image { margin: 0; padding: 0; }
.featured-image img { width: 100%; max-height: 400px; object-fit: cover; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag { padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.tag:hover { color: var(--text); border-color: var(--teal); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; padding: 24px 20px 0; border-top: 1px solid var(--border); }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text); }
.post-nav a:hover { border-color: var(--teal); }
.post-nav .prev { text-align: left; }
.post-nav .next { text-align: right; grid-column: 2; }
.post-nav .label { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.post-nav .title { font-weight: 600; font-size: 14px; color: inherit; }

/* List / Archive */
.list-header { padding: 60px 20px 40px; background: linear-gradient(180deg, #0E92C9, #0A7BA5); color: #fff; text-align: center; }
.list-header h1 { font-size: clamp(28px, 5vw, 48px); margin: 0 0 8px; }
.list-header .description { color: rgba(255, 255, 255, 0.8); margin: 0; }

/* Blog Search (Pagefind) */
#search {
  --pagefind-ui-scale: 1;
  --pagefind-ui-primary: var(--teal);
  --pagefind-ui-text: var(--text);
  --pagefind-ui-background: var(--card);
  --pagefind-ui-border: var(--border);
  --pagefind-ui-tag: var(--card);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 12px;
  --pagefind-ui-font: inherit;
}

.categories-list { margin-top: 16px; text-align: center; color: var(--muted); font-size: 14px; }
.categories-label { font-weight: 600; margin-right: 4px; }
.category-tag { color: var(--teal); font-weight: 500; }
.category-tag:hover { color: var(--text); }

.posts-grid { gap: 24px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.post-card .card-image { display: block; aspect-ratio: 16/9; overflow: hidden; }
.post-card .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease; }
.post-card:hover .card-image img { transform: scale(1.03); }
.post-card .card-content { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.post-card h2 { text-align: left; font-size: 18px; margin: 0 0 8px; }
.post-card h2 a { color: inherit; }
.post-card h2 a:hover { color: var(--teal); }
.post-card p { margin: 0 0 auto; color: var(--muted); font-size: 14px; }
.card-meta { display: flex; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; }
.pagination a { padding: 8px 16px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 500; }
.pagination a:hover { border-color: var(--teal); }
.page-info { color: var(--muted); font-size: 14px; }

/* 404 Page */
.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.error-page h1 { font-size: 120px; line-height: 1; color: var(--teal); margin: 0; }
.error-page p { font-size: 24px; color: var(--muted); margin: 0 0 24px; }

/* Footer */
footer { padding: 26px 20px 40px; color: var(--muted); }
footer .wrap { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
footer .links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }
footer .links a { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; text-decoration-line: underline; text-decoration-thickness: 2px; text-decoration-color: #0E92C9; text-underline-offset: 4px; opacity: 0.9; color: var(--muted); }
footer .links a:hover { opacity: 1; color: var(--text); }
footer .footer-cta { margin-bottom: 20px; }
footer .footer-cta .app-badge { box-shadow: none; }
footer .footer-cta .app-badge img { height: auto; }
footer .legal { font-size: 14px; line-height: 1.5; margin: 1em; }

/* Mobile Title */
.mobile-title { display: none; }

/* Responsive */
@media (max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
  .reviews { column-width: 240px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: 1; text-align: left; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  header { padding: 46px 18px 0; }
  .hero .title { display: none; }
  .mobile-title { display: block; margin: 20px 0 0; font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--text); }
  .hero-shot img { max-height: 320px; width: auto; }
  .cta-row { flex-direction: column; align-items: center; justify-content: center; }
  .article-header, .list-header { padding: 40px 0 30px; }
}
