:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: #111111;
  --muted: rgba(17, 17, 17, .62);
  --soft: rgba(17, 17, 17, .44);
  --line: rgba(17, 17, 17, .10);
  --orange: #ff9900;
  --radius: 10px;
  --shadow: 0 12px 34px rgba(17, 17, 17, .075);
  --shadow-large: 0 22px 70px rgba(15, 23, 42, .10), 0 8px 24px rgba(15, 23, 42, .06);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-view="index"] {
  position: relative;
  overflow-x: hidden;
}

body[data-view="index"]::before {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  width: 100%;
  height: min(900px, 100svh);
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, .98) 26%, rgba(255, 255, 255, .80) 44%, rgba(255, 255, 255, .18) 78%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .16) 32%, rgba(255, 255, 255, .88) 78%, rgba(255, 255, 255, 1) 100%),
    url("/data/images/insights.png");
  background-position: right top;
  background-repeat: no-repeat;
  background-size: cover;
}

body[data-view="index"] > * {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.site-header,
.page-shell,
.site-footer,
.article-shell {
  width: min(100% - 28px, 1180px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}

.header-inner {
  display: contents;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: clamp(34px, 4vw, 46px);
  height: clamp(34px, 4vw, 46px);
  flex: 0 0 auto;
  border-radius: var(--radius);
  object-fit: cover;
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 14px;
  font-weight: 950;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 6px;
}

.site-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(17, 17, 17, .055);
  color: var(--text);
}

.studio-link,
.btn-secondary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.studio-link {
  justify-self: end;
  background: #000000;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(17, 17, 17, .16);
}

.studio-link:hover {
  background: var(--orange);
  color: #111111;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(255, 153, 0, .28);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(17, 17, 17, .055);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

.page-shell {
  min-height: 70vh;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 28px 0 0;
}

.hero-copy {
  width: min(100%, 760px);
  padding: clamp(28px, 6vw, 72px) clamp(8px, 2vw, 14px) 0 0;
  text-align: left;
}

.eyebrow {
  display: block;
  margin: 0 0 12px;
  color: #9a5d00;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 950;
  line-height: .94;
  text-wrap: balance;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
}

.search {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.hero-search {
  width: min(100%, 620px);
  margin: 30px 0 0;
  text-align: left;
}

.search:focus-within {
  border-color: rgba(0, 0, 0, .34);
  box-shadow: 0 0 0 4px rgba(255, 153, 0, .14), var(--shadow);
}

.search svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px;
  margin: 14px 0 0;
}

.tag-filter {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: capitalize;
}

.tag-filter:hover,
.tag-filter.active {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.feed {
  padding: 8px 0 100px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.post-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.post-card:hover {
  border-color: rgba(255, 153, 0, .58);
  transform: translateY(-3px);
  box-shadow: var(--shadow-large);
}

.post-image {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #111111;
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .22s ease;
}

.post-card:hover .post-image img {
  transform: scale(1.02);
}

.post-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.post-meta,
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
}

.post-meta {
  margin-bottom: 12px;
}

.post-tag {
  color: #9a5d00;
  text-transform: uppercase;
}

.post-copy h3 {
  margin: 0;
  font-size: 23px;
  line-height: 1.18;
}

.post-copy p {
  display: -webkit-box;
  margin: 12px 0 20px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-footer {
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.post-footer strong {
  color: var(--text);
  font-size: 12px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 20px;
  text-align: center;
}

.empty-state > span {
  font-size: 32px;
}

.empty-state h2 {
  margin: 0;
  font-size: 30px;
}

.empty-state p {
  margin: 0 0 10px;
  color: var(--muted);
}

.load-more {
  margin: 26px auto 0;
}

.site-footer {
  min-height: 76px;
  margin-top: 8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-copy {
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  font-weight: 800;
}

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

.article-shell {
  min-height: 75vh;
  padding: 40px 0 100px;
}

.article-breadcrumb {
  min-height: 42px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

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

.article-breadcrumb span[aria-current="page"] {
  max-width: min(520px, 70vw);
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article {
  padding-top: clamp(44px, 7vw, 84px);
}

.article-head {
  max-width: 760px;
  margin: auto;
  text-align: left;
}

.article-tags {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.article-tags a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: var(--radius);
  background: rgba(255, 153, 0, .13);
  color: #805000;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.article-head h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 950;
  line-height: .96;
}

.article-head > p {
  max-width: 700px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
}

.article-meta {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 9px 22px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-image {
  aspect-ratio: 16 / 9;
  margin: clamp(46px, 7vw, 78px) auto;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111111;
  box-shadow: var(--shadow-large);
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  max-width: 720px;
  margin: auto;
  padding: 20px;
  font-size: 18px;
  line-height: 1.82;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  margin: 2em 0 .7em;
  line-height: 1.15;
}

.article-body h1 {
  font-size: clamp(36px, 5vw, 52px);
}

.article-body h2 {
  font-size: clamp(30px, 4vw, 42px);
}

.article-body h3 {
  font-size: 25px;
}

.article-body p {
  margin: 0 0 1.4em;
  color: var(--text);
}

.article-body blockquote {
  margin: 2em 0;
  padding: 16px 20px;
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #f7f7f7;
}

.article-body a {
  color: #8a5300;
  font-weight: 750;
  text-decoration: underline;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}

.article-body img,
.article-body video {
  width: 100%;
  height: auto;
  display: block;
  margin: 2em 0;
  border-radius: var(--radius);
}

.article-media {
  margin: 2em 0;
}

.article-media img,
.article-media video {
  margin: 0;
}

.article-media figcaption {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.article-media figcaption strong {
  color: var(--text);
}

.article-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #f0f0f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
}

.article-code {
  position: relative;
  margin: 2em 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111111;
  color: #ffffff;
}

.article-code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 7px;
  background: rgba(255, 255, 255, .09);
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.article-code-copy:hover {
  background: rgba(255, 255, 255, .16);
}

.article-body .article-code pre {
  margin: 0;
  padding: 56px 20px 20px;
  overflow-x: auto;
  border-radius: inherit;
  background: transparent;
  color: #ffffff;
  line-height: 1.65;
  white-space: pre;
}

.article-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-embed {
  width: 100%;
  margin: 2em 0;
  overflow: hidden;
  border-radius: 18px;
}

.article-embed iframe,
.article-embed video,
.article-embed embed,
.article-embed object {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 0;
}

.article-embed-error {
  margin: 2em 0;
  padding: 16px;
  border-radius: var(--radius);
  background: #f7f7f7;
  color: var(--muted);
}

.article-button-wrap {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

.article-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 10px;
  background: #111111;
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.article-button:hover {
  background: #ff9900;
  color: #111111;
}

.article-body hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-qa {
  margin: 2em 0;
  padding: 22px;
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #fafafa;
}

.article-qa h2 {
  margin: 0 0 .65em;
  font-size: clamp(24px, 3vw, 32px);
}

.article-qa > div {
  color: var(--text);
}

.article-end {
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 24px auto 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
  box-shadow: var(--shadow);
}

.article-end > div {
  display: grid;
  gap: 5px;
}

.article-end strong {
  font-size: 16px;
}

.article-end > div span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    display: block;
    justify-self: end;
    border-radius: var(--radius);
    background: rgba(17, 17, 17, .055);
    color: var(--text);
    font-size: 11px;
    font-weight: 850;
  }

  .header-inner > .studio-link {
    display: none;
  }

  .site-nav {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    padding-top: 8px;
  }

  .site-nav.open {
    display: grid;
    grid-template-columns: 1fr;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header,
  .page-shell,
  .site-footer,
  .article-shell {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding-top: 20px;
  }

  .hero-copy {
    width: 100%;
    padding: 28px 0 0;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 62px);
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 15px;
  }

  .feed {
    padding-top: 6px;
  }

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

  .article-head h1 {
    font-size: 42px;
  }

  .article-head > p {
    font-size: 16px;
  }

  .article-image {
    margin-inline: -12px;
    border-radius: 0;
  }

  .article-end,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-end .studio-link {
    width: 100%;
  }

  .footer-links {
    justify-content: flex-start;
  }

  body[data-view="index"]::before {
    background-image:
      linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .84) 100%),
      linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .22) 28%, rgba(255, 255, 255, .94) 82%, rgba(255, 255, 255, 1) 100%),
      url("/data/images/insights.png");
    background-position: 62% top;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
