
:root {
  --bg: #ffffff;
  --bg2: #f6f7f9;
  --text: #111318;
  --muted: #5b6472;
  --card: #ffffff;
  --border: rgba(17,19,24,.10);
  --shadow: 0 14px 40px rgba(17,19,24,.08);
  --shadow2: 0 10px 30px rgba(17,19,24,.10);
  --brand: #0a6bff;
  --btnText: #ffffff;
  --focus: rgba(10,107,255,.30);
}

/* Dark mode */
html[data-theme="dark"] {
  --bg: #0b0e14;
  --bg2: #111624;
  --text: #e7ecf5;
  --muted: #a7b1c2;
  --card: #0f1420;
  --border: rgba(231,236,245,.12);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --shadow2: 0 12px 36px rgba(0,0,0,.40);
  --brand: #6aa7ff;
  --btnText: #08101f;
  --focus: rgba(106,167,255,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: rgba(0,0,0,.2); }
html[data-theme="dark"] a:hover { text-decoration-color: rgba(255,255,255,.25); }

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

/* Utilities */
.sg-container { width: min(1180px, 100% - 40px); margin: 0 auto; }
.sg-main { padding: 28px 0 60px; }
.sg-small { font-size: 12px; color: var(--muted); }
.sg-sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Header */
.sg-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .sg-header { background: rgba(11,14,20,.75); }

.sg-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.sg-header__left, .sg-header__right { display: flex; align-items: center; gap: 10px; }
.sg-header__right { justify-content: flex-end; }

.sg-brand__text { font-weight: 900; letter-spacing: -0.03em; font-size: 20px; }
.sg-brand__accent { color: var(--brand); }

.sg-nav__menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0;
  margin: 0;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}
.sg-nav__menu a { color: var(--muted); }
.sg-nav__menu a:hover { color: var(--text); text-decoration: none; }

.sg-iconbtn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sg-iconbtn:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

.sg-icon { width: 16px; height: 16px; display: inline-block; }
.sg-icon--menu { background: currentColor; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M2 4h12M2 8h12M2 12h12" stroke="black" stroke-width="2" stroke-linecap="round"/></svg>') center/contain no-repeat; }
.sg-icon--search { background: currentColor; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M11.2 11.2L14 14" stroke="black" stroke-width="2" stroke-linecap="round"/><circle cx="7" cy="7" r="4" stroke="black" stroke-width="2"/></svg>') center/contain no-repeat; }
.sg-icon--moon { background: currentColor; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path d="M10.8 11.9A6 6 0 0 1 4.1 5.2a4.8 4.8 0 1 0 6.7 6.7Z" stroke="black" stroke-width="2" stroke-linejoin="round"/></svg>') center/contain no-repeat; }

.sg-header__panels { padding-bottom: 14px; }
.sg-search-panel, .sg-mobile-nav {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow2);
  padding: 12px;
  margin-top: 10px;
}

.sg-nav__menu--mobile { flex-direction: column; align-items: flex-start; gap: 10px; }

/* Search form */
.sg-searchform { display: flex; gap: 10px; }
.sg-searchform__input {
  flex: 1;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
}
.sg-searchform__input:focus { outline: 3px solid var(--focus); border-color: transparent; }
.sg-searchform__btn {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  cursor: pointer;
}

/* Hero */
.sg-hero {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 22px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--bg2), var(--bg));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 6px 0 28px;
}
.sg-hero__title { margin: 0 0 6px; font-size: clamp(34px, 4vw, 46px); letter-spacing: -0.03em; }
.sg-hero__subtitle { margin: 0 0 14px; color: var(--muted); font-size: 16px; max-width: 60ch; }
.sg-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }

.sg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--btnText);
  font-weight: 800;
  border: 1px solid rgba(0,0,0,0);
}
.sg-btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.sg-btn:hover { text-decoration: none; filter: brightness(0.98); }

.sg-hero__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.sg-card__title { margin: 0 0 10px; font-size: 15px; }
.sg-quicklinks { margin: 0; padding-left: 16px; color: var(--muted); }
.sg-quicklinks a { color: var(--muted); font-weight: 700; }
.sg-quicklinks a:hover { color: var(--text); text-decoration: none; }

/* Section heading */
.sg-sectionhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 0 16px; }
.sg-sectionhead__title { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.sg-sectionhead__desc { color: var(--muted); }

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

.sg-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow2);
  transition: transform .18s ease, box-shadow .18s ease;
}
.sg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sg-card__link { display: grid; height: 100%; }
.sg-card__media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.sg-card__placeholder { width: 100%; aspect-ratio: 16/9; background: var(--bg2); }
.sg-card__body { padding: 14px 14px 16px; }
.sg-card__title { margin: 0 0 8px; font-size: 17px; line-height: 1.25; }
.sg-card__excerpt { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.sg-card__meta { color: var(--muted); font-size: 12px; display: flex; gap: 8px; }

/* Article */
.sg-article { max-width: 820px; margin: 0 auto; }
.sg-article__meta { color: var(--muted); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.sg-article__title { margin: 10px 0 14px; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.03em; line-height: 1.15; }
.sg-article__thumb { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow2); }
.sg-article__content { font-size: 16px; }
.sg-article__content h2, .sg-article__content h3 { letter-spacing: -0.02em; }
.sg-article__content a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 2px; }

.sg-page { max-width: 860px; margin: 0 auto; }
.sg-page__title { margin: 0 0 12px; font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -0.03em; }

/* Pagination */
.sg-pagination { margin-top: 26px; }
.nav-links { display: flex; justify-content: space-between; gap: 14px; }
.page-numbers { padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.page-numbers.current { background: var(--bg2); font-weight: 800; }

/* Footer */
.sg-footer { border-top: 1px solid var(--border); background: var(--bg); padding: 34px 0 22px; }
.sg-footer__inner { display: grid; grid-template-columns: 1.2fr 1fr 0.8fr; gap: 18px; align-items: start; }
.sg-footer__logo { font-weight: 900; font-size: 18px; letter-spacing: -0.02em; }
.sg-footer__logo span { color: var(--brand); }
.sg-footer__tagline { margin: 10px 0 0; color: var(--muted); max-width: 50ch; }

.sg-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--muted); }
.sg-footer__links a { color: var(--muted); font-weight: 700; }
.sg-footer__links a:hover { color: var(--text); text-decoration: none; }

.sg-newsletter { display: flex; gap: 10px; }
.sg-newsletter input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
}
.sg-newsletter button {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0);
  background: var(--brand);
  color: var(--btnText);
  font-weight: 800;
  cursor: pointer;
}
.sg-footer__bottom { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--border); }

/* Widgets */
.widget { color: var(--muted); }
.widget-title { margin: 0 0 10px; color: var(--text); font-size: 14px; letter-spacing: -0.01em; }

/* Responsive */
@media (max-width: 980px) {
  .sg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-footer__inner { grid-template-columns: 1fr; }
  .sg-nav { display: none; }
}
@media (max-width: 720px) {
  .sg-header__inner { grid-template-columns: 1fr auto; }
  .sg-header__left { gap: 8px; }
  .sg-hero { grid-template-columns: 1fr; }
  .sg-grid { grid-template-columns: 1fr; }
}

/* Gutenberg defaults */
.wp-block-image img { border-radius: 14px; border: 1px solid var(--border); }
.wp-block-quote { border-left: 3px solid var(--border); padding-left: 14px; color: var(--muted); }
