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

:root {
  --bg: #ffffff;
  --surface: #f8f8f9;
  --border: #e8e8ec;
  --text: #1d1d1f;
  --muted: #6e6e78;
  --accent: #f6821f;
  --accent-soft: #fff4ec;
  --sidebar-w: 220px;
  --radius: 8px;
  --max: 860px;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────
   SIDEBAR — hidden on mobile, shown desktop
───────────────────────────────────────── */
.sidebar {
  display: none;
}

.sidebar-logo {
  padding: 20px 20px 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo a {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.sidebar-logo a span { color: var(--accent); }

.sidebar-section { padding: 20px 12px 8px; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 8px;
  margin-bottom: 4px;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  transition: background 0.12s, color 0.12s;
}

.sidebar-nav a:hover { background: var(--surface); color: var(--text); }

.sidebar-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.sidebar-nav .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────────
   TOPBAR
───────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar a, .topbar button {
  font-family: inherit;
  font-size: 13px;
  text-decoration: none;
  padding: 0 12px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  border: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.topbar-link { color: var(--muted); background: transparent; }
.topbar-link:hover { background: var(--surface); color: var(--text); }

.topbar-ai { color: var(--accent); background: var(--accent-soft); font-weight: 500; }
.topbar-ai:hover { background: #fde8d0; }

.topbar-avatar {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border) !important;
  color: var(--muted);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-avatar:hover { background: #ebebef; color: var(--text); }

/* ─────────────────────────────────────────
   MAIN & PAGE
───────────────────────────────────────── */
.main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  padding: 32px 20px 60px;
}

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

h1 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.4px; line-height: 1.2; margin-bottom: 14px; }
h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 8px; }
h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }

p { color: var(--muted); max-width: 560px; }

.hero-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 20px;
}

/* ─────────────────────────────────────────
   CARDS
───────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover { border-color: #d0d0d8; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.card-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}

.card p { font-size: 13px; margin-top: 4px; max-width: none; }

/* ─────────────────────────────────────────
   PLACEHOLDER
───────────────────────────────────────── */
.placeholder-box {
  margin-top: 28px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.placeholder-box .big { font-size: 2rem; margin-bottom: 12px; }

/* ─────────────────────────────────────────
   BLOG
───────────────────────────────────────── */
.post {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: block;
  transition: box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}

.post:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.post-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.post-date { font-size: 12px; color: var(--muted); }

.post-tag {
  font-size: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 500;
}

.post p { font-size: 13.5px; margin-top: 6px; }

/* ─────────────────────────────────────────
   CONTACT
───────────────────────────────────────── */
.contact-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 28px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

.contact-item { display: flex; flex-direction: column; gap: 4px; }

.contact-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-item a { color: var(--text); text-decoration: none; }
.contact-item a:hover { color: var(--accent); }

.contact-form {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.contact-form label { display: grid; gap: 6px; }

.contact-form span { color: var(--muted); font-size: 13px; font-weight: 600; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  transition: border-color 0.15s;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }

.contact-form textarea { resize: vertical; }

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  transition: background 0.15s;
}

.btn:hover { background: #e0721a; }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 20px;
  font-size: 12px;
  color: var(--muted);
}

/* ─────────────────────────────────────────
   OVERLAY (mobile sidebar backdrop)
───────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: 40;
}

.overlay.open { display: block; }

.sidebar { transform: translateX(-100%); transition: transform 0.2s; }
.sidebar.open { transform: translateX(0); }

.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.hamburger:hover { background: var(--surface); }

/* ─────────────────────────────────────────
   DESKTOP  min-width: 680px
───────────────────────────────────────── */
@media (min-width: 680px) {
  body { display: flex; }

  .hamburger { display: none; }
  .overlay { display: none !important; }

  .sidebar {
    display: flex;
    transform: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    z-index: 100;
    overflow-y: auto;
  }

  .main { margin-left: var(--sidebar-w); }

  .topbar { padding: 0 48px; }

  .page { padding: 48px 48px 80px; }

  h1 { font-size: 2.2rem; }

  .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 36px; }

  .contact-split { grid-template-columns: minmax(0, 300px) minmax(0, 460px); justify-content: space-between; }

  .contact-grid { grid-template-columns: 1fr; }

  .btn { width: auto; }

  footer { padding: 20px 48px; }
}
