:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e4e4e4;
  --accent: #6d5bd0;
  --accent-2: #38b6c6;
  --sidebar-w: 220px;
  --topbar-h: 60px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
}

/* --- Topbar --- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.topbar .brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}

.topnav {
  display: flex;
  gap: 22px;
}

.topnav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.topnav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--topbar-h));
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  z-index: 90;
  overflow-y: auto;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar nav a {
  padding: 10px 24px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  border-left: 3px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: var(--text);
  border-left-color: var(--accent);
  background: rgba(109, 91, 208, 0.07);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 80;
}

.sidebar-backdrop.show {
  display: block;
}

/* --- Content --- */
.content {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
}

.hero {
  min-height: 66vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  color: #fff;
  background: linear-gradient(135deg, #6d5bd0 0%, #4f7ff0 45%, #38c6b6 100%);
  scroll-margin-top: var(--topbar-h);
}

.hero-inner {
  max-width: 640px;
}

.hero .eyebrow {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
}

.hero .tagline {
  margin: 0 0 30px;
  font-size: 1.05rem;
  opacity: 0.92;
}

.hero-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #fff;
  color: #4f4fbe;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #fff;
}

section {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px;
  scroll-margin-top: var(--topbar-h);
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 8px;
}

.section-desc {
  color: var(--muted);
  margin: 0 0 24px;
}

.group-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 32px 0 12px;
}

.group-title:first-of-type {
  margin-top: 8px;
}

.card-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.site-link {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.site-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.site-link .title {
  font-weight: 600;
  display: block;
}

.site-link .url {
  display: block;
  color: #888;
  font-size: 0.85rem;
}

.site-link .desc {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 8px;
}

.link-icon {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 6px;
}

.link-icon img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.creative-link .link-icon img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

/* Icon sits inline next to the title instead of stacked above it. */
.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.link-row .link-icon {
  display: inline-flex;
  margin-bottom: 0;
  flex-shrink: 0;
}

.link-row .title {
  display: inline;
}

.about-section p {
  color: #444;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px 56px;
  text-align: center;
  color: #888;
  font-size: 0.85rem;
}

.footer-links {
  margin-top: 4px;
}

.footer-links a {
  color: #888;
  margin: 0 4px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .topnav {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .content {
    margin-left: 0;
  }
}

/* --- Guide pages (leaf content pages, no topbar/sidebar shell - same
   lighter pattern as contact.html/privacy.html) --- */
.guide-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  line-height: 1.7;
}

.guide-back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.guide-breadcrumb {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 8px;
}

.guide-page h1 {
  font-size: 1.6rem;
  margin: 0 0 8px;
}

.guide-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.guide-page h2 {
  font-size: 1.15rem;
  margin: 32px 0 12px;
}

.guide-page p {
  color: #333;
}

.guide-page ul,
.guide-page ol {
  color: #333;
  padding-left: 1.4rem;
}

.guide-page li {
  margin-bottom: 6px;
}

.guide-callout {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 4px 20px;
  margin: 20px 0;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.92rem;
}

.guide-table th,
.guide-table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.guide-table th {
  background: #fafafa;
  font-weight: 600;
}

.guide-related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.guide-related h2 {
  font-size: 1rem;
  margin-top: 0;
}

.guide-related ul {
  list-style: none;
  padding: 0;
}

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

/* --- Guide hub (/guides/) --- */
.guide-hub-section {
  margin-top: 32px;
}

.guide-hub-section h2 {
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 32px 0 12px;
}

.guide-hub-section:first-of-type h2 {
  margin-top: 8px;
}

.guide-card-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 560px) {
  .guide-card-grid {
    grid-template-columns: 1fr;
  }
}

.guide-card {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.guide-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.guide-card .title {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.guide-card .desc {
  color: #888;
  font-size: 0.85rem;
}
