:root {
  --bg: #ffffff;
  --surface: #f6f5f8;
  --text: #16131c;
  --muted: #6b6475;
  --line: #e6e2ec;
  --accent: #7900ea;
  --accent-ink: #ffffff;
  --tag: #ffaaa6;
  --tag-ink: #2a0a08;
  --radius: 10px;
  --wrap: 1100px;
  --prose: 720px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121016;
    --surface: #1c1922;
    --text: #efecf3;
    --muted: #a49cb0;
    --line: #2e2a36;
    --accent: #b77bff;
    --accent-ink: #120a1c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.brand img { border-radius: 6px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; gap: 4px; padding-bottom: 12px; }
  .menu-toggle[aria-expanded="true"] + .nav { display: flex; }
  .nav a { padding: 8px 0; }
}

/* hero */
.hero { position: relative; background: #1a1220 center 30% / cover no-repeat; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(121,0,234,.55), transparent 55%), linear-gradient(135deg, #1a1220 0%, #2a1740 100%); }
.hero-inner { position: relative; padding: 80px 20px; display: grid; grid-template-columns: 1fr minmax(240px, 380px); gap: 48px; align-items: center; }
.hero-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 35%; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.45); border: 3px solid rgba(255,255,255,.12); }
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 20px 56px; gap: 32px; }
  .hero-photo { max-width: 260px; order: -1; }
  .hero-logo { display: none; }
}
.hero-logo { border-radius: 8px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.02; margin: 0 0 14px; letter-spacing: -.02em; }
.tagline { display: table; background: var(--tag); color: var(--tag-ink); font-weight: 600; padding: 4px 12px; border-radius: 4px; margin: 0 0 28px; }
.btn { display: inline-block; border: 2px solid #fff; color: #fff; padding: 10px 22px; border-radius: 6px; text-decoration: none; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; }
.btn:hover { background: #fff; color: #1a1220; }

/* sections & cards */
.section { padding: 56px 20px; }
.section-title, .page-title { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.page-title { font-size: clamp(30px, 5vw, 44px); letter-spacing: -.01em; text-transform: none; color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.card-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.card img, .card-ph { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.card-ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #3b0072); color: #fff; font-weight: 800; font-size: 20px; }
.card-body { padding: 18px 20px 22px; }
.card h3 { margin: 4px 0 8px; font-size: 20px; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.meta { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; margin: 0; }
.meta a { color: var(--accent); text-decoration: none; }

/* prose */
.prose { max-width: calc(var(--prose) + 40px); padding-top: 48px; padding-bottom: 24px; }
.post-head { margin-bottom: 28px; }
.post-head h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.12; letter-spacing: -.02em; margin: 8px 0 0; }
.prose h2 { font-size: 28px; line-height: 1.25; margin: 48px 0 12px; }
.prose h3 { font-size: 22px; line-height: 1.3; margin: 36px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 20px; }
.prose li { margin-bottom: 8px; }
.prose figure { margin: 28px 0; }
.prose figure img { border-radius: var(--radius); margin: 0 auto; }
.prose figcaption { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 10px; }
.prose blockquote { border-left: 4px solid var(--accent); margin: 24px 0; padding: 4px 0 4px 20px; color: var(--muted); }
.embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); background: #000; display: block; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.social { display: flex; gap: 16px; }
.social a { color: var(--text); display: inline-flex; }
.social svg { width: 22px; height: 22px; fill: currentColor; }
.social a:hover { color: var(--accent); }
