:root {
  --teal: #0b8196;
  --teal-dark: #075e6e;
  --teal-soft: #e0f4f6;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #dde9ec;
  --bg: #fbfdfd;
  --bg-tint: #f1f8f9;
  --card: #ffffff;
  --accent: #f59e0b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal: #2bb8c9;
    --teal-dark: #7dd3dc;
    --teal-soft: #0f3640;
    --ink: #e8eef2;
    --ink-2: #a9b7c3;
    --ink-3: #6b7c8a;
    --line: #22323b;
    --bg: #0b1418;
    --bg-tint: #101d22;
    --card: #12212a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand span { font-family: var(--serif); font-size: 1.15rem; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.social { display: flex; gap: 6px; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  color: var(--ink-2); border: 1px solid var(--line); background: var(--card);
}
.icon-btn:hover { color: var(--teal); border-color: var(--teal); text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }

@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav .social { padding-top: 12px; }
  .menu-toggle { display: grid; margin-left: auto; cursor: pointer; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px;
  font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #04232a; } .btn-primary:hover { background: #5fd0dc; } }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-sm { padding: 8px 12px; font-size: .85rem; border-radius: 10px; }

/* Hero */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--teal) 18%, transparent), transparent 65%);
  pointer-events: none;
}
.hero .wrap { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 2px; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--teal); }
.hero .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; margin-bottom: 30px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.icon-stack { position: relative; height: 320px; }
.icon-stack img {
  position: absolute; width: 150px; height: 150px; border-radius: 34px; box-shadow: 0 20px 50px rgba(15, 23, 42, .18);
  transition: transform .4s ease;
}
.icon-stack img:nth-child(1) { left: 8%; top: 6%; transform: rotate(-8deg); }
.icon-stack img:nth-child(2) { right: 6%; top: 22%; transform: rotate(7deg); }
.icon-stack img:nth-child(3) { left: 28%; bottom: 0; transform: rotate(-2deg); }
.icon-stack:hover img:nth-child(1) { transform: rotate(-12deg) translateY(-6px); }
.icon-stack:hover img:nth-child(2) { transform: rotate(11deg) translateY(-6px); }
@media (max-width: 860px) {
  .hero { padding: 56px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .icon-stack { height: 200px; max-width: 360px; }
  .icon-stack img { width: 104px; height: 104px; border-radius: 24px; }
}

/* Sections */
section { padding: 72px 0; }
.tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.section-head p { color: var(--ink-2); margin: 8px 0 0; max-width: 34em; }

/* App cards */
.apps { display: grid; gap: 20px; }
.app {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 24px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.app > img { width: 96px; height: 96px; border-radius: 22px; }
.app h3 { font-size: 1.55rem; margin-bottom: 4px; }
.app .tag { color: var(--teal); font-weight: 600; font-size: .95rem; margin-bottom: 12px; }
.app ul { margin: 0; padding: 0; list-style: none; color: var(--ink-2); display: grid; gap: 6px; }
.app li { padding-left: 22px; position: relative; }
.app li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); opacity: .7; }
.app .links { display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.app .links small { color: var(--ink-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-top: 6px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); margin-left: 8px; vertical-align: middle; font-family: var(--sans); }
@media (max-width: 860px) {
  .app { grid-template-columns: 72px 1fr; padding: 22px; gap: 18px; }
  .app > img { width: 72px; height: 72px; border-radius: 17px; }
  .app .links { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .app .links small { width: 100%; }
}

/* Post cards */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; color: var(--ink); transition: border-color .2s, transform .2s;
}
.post-card:hover { text-decoration: none; border-color: var(--teal); transform: translateY(-2px); }
.post-card .meta { font-size: .8rem; color: var(--ink-3); margin-bottom: 10px; font-weight: 500; }
.post-card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.post-card p { color: var(--ink-2); font-size: .95rem; margin: 0 0 16px; }
.post-card .more { margin-top: auto; color: var(--teal); font-weight: 600; font-size: .9rem; }
@media (max-width: 860px) { .posts { grid-template-columns: 1fr; } }

/* Social band */
.social-band { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.social-card {
  display: flex; align-items: center; gap: 18px; padding: 28px; border-radius: var(--radius); color: #fff;
}
.social-card:hover { text-decoration: none; filter: brightness(1.05); }
.social-card svg { width: 44px; height: 44px; flex: none; }
.social-card strong { display: block; font-family: var(--serif); font-size: 1.35rem; }
.social-card span { opacity: .9; font-size: .95rem; }
.social-card.ig { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.social-card.yt { background: linear-gradient(135deg, #ff3b3b, #c4161c); }
@media (max-width: 760px) { .social-band { grid-template-columns: 1fr; } }

/* About */
.about { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.about .portrait {
  width: 240px; aspect-ratio: 1; border-radius: 28px; background: var(--teal-soft); display: grid; place-items: center;
  color: var(--teal); overflow: hidden;
}
.about .portrait img { width: 100%; height: 100%; object-fit: cover; }
.about .portrait svg { width: 52%; height: 52%; border-radius: 22%; }
.about h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 18px; }
.about p { color: var(--ink-2); font-size: 1.08rem; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 24px; } .about .portrait { width: 140px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--ink-3); font-size: .9rem; }
.site-footer .wrap { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); }

/* Article */
.article-head { padding: 64px 0 24px; }
.article-head .back { font-size: .9rem; font-weight: 600; display: inline-block; margin-bottom: 24px; }
.article-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 14px; }
.article-head .meta { color: var(--ink-3); font-size: .92rem; }
.prose { padding-bottom: 64px; font-size: 1.1rem; line-height: 1.75; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.2em; }
.prose h2 { font-size: 1.65rem; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.3rem; margin: 1.5em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { border-left: 3px solid var(--teal); padding: 4px 0 4px 18px; color: var(--ink-2); font-style: italic; }
.prose code { font-size: .9em; background: var(--bg-tint); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.prose img { border-radius: 14px; margin: 1.5em 0; }
.post-cta { margin: 8px 0 64px; padding: 24px; border-radius: var(--radius); background: var(--bg-tint); border: 1px solid var(--line);
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.post-cta p { margin: 0; color: var(--ink-2); }

.post-list { display: grid; gap: 4px; padding-bottom: 64px; }
.post-row { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.post-row:hover { text-decoration: none; }
.post-row:hover h2 { color: var(--teal); }
.post-row time { color: var(--ink-3); font-size: .9rem; padding-top: 4px; }
.post-row h2 { font-size: 1.4rem; margin-bottom: 6px; transition: color .2s; }
.post-row p { color: var(--ink-2); margin: 0; }
@media (max-width: 600px) { .post-row { grid-template-columns: 1fr; gap: 4px; } }

.notfound { padding: 120px 0; text-align: center; }
.notfound h1 { font-size: 3rem; margin-bottom: 12px; }
