/* ============================================================
   Nexia System — Shared design tokens & base styles
   ============================================================ */

:root {
  --bg:        #0B0B0D;
  --bg-2:      #111114;
  --surface:   #15161A;
  --surface-2: #1C1D22;
  --border:    #26272D;
  --border-2:  #34353C;

  --fg:        #F2F2EF;
  --fg-dim:    #C9CAD0;
  --muted:     #8A8B93;
  --faint:     #5A5B62;

  --blue:      #3BA9E8;
  --blue-2:    #1E8FD1;
  --blue-soft: rgba(59, 169, 232, 0.14);
  --blue-line: rgba(59, 169, 232, 0.35);

  --display: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  --body:    'Inter', 'Helvetica Neue', sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --pad-x: clamp(24px, 5vw, 80px);
  --max:   1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: #0B0B0D; }

/* layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section { padding: clamp(80px, 11vw, 160px) 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--border-2);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(48px, 7.5vw, 112px); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.03; }
h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.18; }

p  { color: var(--fg-dim); }
p.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--fg-dim);
  line-height: 1.55;
  max-width: 56ch;
  text-wrap: pretty;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--blue); color: #07131C; }
.btn--primary:hover { background: #4FB6EF; }

.btn--ghost { background: transparent; color: var(--fg); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }

.btn--dark { background: #181a1f; color: var(--fg); border-color: var(--border); }
.btn--dark:hover { border-color: var(--border-2); background: #1d1f25; }

.btn .arrow {
  width: 16px; height: 16px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12h13M13 6l6 6-6 6' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12h13M13 6l6 6-6 6' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 11, 13, 0.80);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #0d0d10;
  display: grid; place-items: center;
  overflow: hidden;
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }

.nav__links {
  display: flex;
  gap: 36px;
  align-items: center;
  font-size: 14px;
  color: var(--fg-dim);
}
.nav__links a { position: relative; padding: 6px 0; transition: color .15s ease; }
.nav__links a:hover { color: var(--fg); }
.nav__links a.active { color: var(--fg); }
.nav__links a.active::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: -2px;
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--blue);
}

@media (max-width: 760px) { .nav__links { display: none; } .nav .btn { display: none; } }

/* footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 72px 0 32px;
  background: var(--bg-2);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 56px;
}
.footer__col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__col a { color: var(--fg-dim); font-size: 14px; }
.footer__col a:hover { color: var(--blue); }

.footer__about p { color: var(--muted); font-size: 14px; margin: 16px 0 0; max-width: 36ch; }
.footer__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding-top: 24px;
  color: var(--faint);
  font-size: 12px;
  font-family: var(--mono);
}
@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* dot field utility */
.dot-field {
  background-image: radial-gradient(rgba(59, 169, 232, 0.32) 1px, transparent 1.4px);
  background-size: 14px 14px;
}

/* shared article card */
.article__cover { position: relative; overflow: hidden; }

/* article card styles shared across blog listing + blog preview */
.article {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}
.article:hover { transform: translateY(-4px); border-color: var(--border-2); }
.article__cover {
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.article__cover .pattern { position: absolute; inset: 0; background-size: 12px 12px; }
.article__cover.c1 .pattern { background-image: radial-gradient(rgba(59,169,232,0.55) 1px, transparent 1.4px); }
.article__cover.c2 .pattern {
  background: radial-gradient(rgba(59,169,232,0.18) 1px, transparent 1.4px), linear-gradient(135deg, #18242c, #0c1318);
  background-size: 12px 12px, auto;
}
.article__cover.c3 .pattern {
  background: repeating-linear-gradient(45deg, rgba(59,169,232,0.22) 0, rgba(59,169,232,0.22) 1px, transparent 1px, transparent 14px), linear-gradient(180deg, #0f1418, #1a2128);
}
.article__cover.c4 .pattern {
  background: radial-gradient(circle at 30% 40%, rgba(59,169,232,0.5) 0, rgba(59,169,232,0) 50%), radial-gradient(circle at 75% 70%, rgba(59,169,232,0.35) 0, rgba(59,169,232,0) 50%), #0e1620;
}
.article__cover.c5 .pattern {
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 16px), linear-gradient(135deg, #0d1219, #18242c);
}
.article__cover.c6 .pattern {
  background: radial-gradient(rgba(59,169,232,0.35) 1.4px, transparent 1.8px), radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px), #0c1116;
  background-size: 20px 20px, 8px 8px, auto;
  background-position: 0 0, 4px 4px, 0 0;
}
.article__cover .stamp {
  position: absolute;
  bottom: 16px; left: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  background: rgba(11,11,13,0.65);
  backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
}
.article__cover .read-mins {
  position: absolute;
  top: 16px; right: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  background: rgba(11,11,13,0.65);
  backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
}
.article__body {
  padding: 24px 24px 28px;
  display: flex; flex-direction: column; gap: 14px;
  flex: 1;
}
.article__title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--fg);
}
.article__excerpt { color: var(--muted); font-size: 14px; line-height: 1.55; }
.article__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
