:root {
  --gold: #ffd275;
  --cream: #f4eddd;
  --grey: #9ca3af;
  --grey-dark: #6b7280;
}

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

html {
  background: #000;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: #000;
  color: var(--cream);
  font-family: 'Urbanist', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

html {
  background: #000;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  /* Only colours transition: animating backdrop-filter itself causes a
     white compositor flash in Chromium as content scrolls under the bar. */
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}
@media (min-width: 768px) {
  .nav-inner { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
  .nav-inner .nav-brand { justify-self: start; }
  .nav-inner .nav-links { justify-self: center; }
  .nav-inner .nav-right { justify-self: end; }
}
.nav-right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.nav-apply { display: none; }
@media (min-width: 1024px) {
  .nav-apply { display: inline; color: #9ca3af; font-family: 'Urbanist', sans-serif;
    font-size: 0.875rem; text-decoration: none; white-space: nowrap; transition: color .2s; }
  .nav-apply:hover { color: var(--gold); }
}
.nav-drop { position: relative; display: inline-block; }
.nav-drop-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.nav-menu { display: none; position: absolute; left: 0; top: 100%; padding-top: 8px; }
.nav-drop:hover .nav-menu { display: block; }
.nav-menu a { display: block; min-width: 180px; background: #000; border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 6px 6px 0 0 #000; padding: 9px 16px; color: var(--cream); text-decoration: none;
  font-family: 'Urbanist', sans-serif; font-size: 0.94rem; }
.nav-menu a + a { border-top: none; }
.nav-menu a:hover { color: var(--gold); background: #0d0d0d; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--cream);
  text-decoration: none;
  font-family: 'Urbanist', system-ui, -apple-system, sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.025em;
}

.nav-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-section {
  color: var(--cream);
  text-decoration: none;
  font-family: 'Urbanist', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5rem;
  padding: 8px 10px;
  transition: color 0.2s;
}

.nav-section:hover {
  color: var(--gold);
}

.nav-cta {
  line-height: 1.5rem;
  display: inline-block;
  background: var(--gold);
  color: #000 !important;
  font-family: 'Urbanist', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  padding: 8px 12px;
  border: 4px solid #000;
  box-shadow: 6px 6px 0 0 #000;
  transition: all 0.2s;
  margin-left: 8px;
  cursor: pointer;
  border-radius: 6px;
}


.nav-cta:hover {
  box-shadow: 3px 3px 0 0 #000;
  transform: translate(3px, 3px);
}

body {
  padding-top: 72px;
}

@media (min-width: 768px) {
  .nav-brand {
    font-size: 1.625rem;
  }
  .nav-brand img {
    width: 48px;
    height: 48px;
  }
  .nav-cta {
    font-size: 1rem;
    padding: 14px 20px;
  }
  .nav-links {
    gap: 4px;
  }
}

@media (min-width: 1024px) {
  :root {
    --nav-scale: clamp(0.85, calc(100vw / 1440), 1.35);
  }
  .nav-links {
    gap: 8px;
  }
  .nav-inner {
    padding-left: 0;
    padding-right: 24px;
  }
  .nav-brand {
    margin-left: calc(-66px * var(--nav-scale) + max(0px, (1 - var(--nav-scale)) * 90px));
  }
  .nav-cta {
    margin-right: calc(-66px * var(--nav-scale) + max(0px, (1 - var(--nav-scale)) * 80px));
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .nav-brand {
    margin-left: 48px;
  }
  .nav-cta {
    margin-right: 24px;
  }
}

@media (max-width: 767px) {
  .nav-section {
    display: none;
  }
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.wrap-wide {
  max-width: 1080px;
}

.eyebrow {
  color: rgba(255, 210, 117, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 18px;
}

.byline {
  color: var(--grey-dark);
  font-size: 0.88rem;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 14px;
}

article h2 .g {
  color: var(--gold);
}

article p {
  color: var(--grey);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

article strong {
  color: var(--cream);
  font-weight: 600;
}

article ul {
  margin: 0 0 18px 20px;
  color: var(--grey);
}

article li {
  margin-bottom: 10px;
  font-size: 1.02rem;
}

article li::marker {
  color: var(--gold);
}

article a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 210, 117, 0.35);
}

article a:hover {
  border-bottom-color: var(--gold);
}

.lead {
  color: var(--cream) !important;
  font-size: 1.15rem !important;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  vertical-align: top;
}

th {
  color: var(--gold);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
}

td {
  color: var(--grey);
}

td:first-child {
  color: var(--cream);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

.cta {
  margin: 48px 0 8px;
  background: var(--gold);
  color: #000;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 0 #000;
  padding: 28px;
}

.cta h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta p {
  color: rgba(0, 0, 0, 0.8);
  margin-bottom: 18px;
  font-size: 0.98rem;
}

.cta a {
  display: inline-block;
  background: #000;
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  padding: 13px 22px;
  font-size: 0.95rem;
  border-radius: 6px;
}

.related {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255, 210, 117, 0.7);
  margin-bottom: 14px;
}

.related a {
  display: block;
  color: var(--cream);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.related a:hover {
  color: var(--gold);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  grid-auto-rows: 1fr;
  gap: 22px;
  margin-top: 40px;
}

.card {
  /* A column so the date and Read link pin to the bottom: titles and
     summaries vary in length, the footer must not. Any new post is
     aligned by construction, with no rule for the writer to remember. */
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  border: 3px solid #000;
  box-shadow: 6px 6px 0 0 #000;
  padding: 26px;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card .tag {
  color: rgba(255, 210, 117, 0.6);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.card h3 {
  color: var(--cream);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 10px 0 10px;
  /* Always two lines tall, whether the title needs one or two, so every
     summary in a row starts on the same line. Longer titles clamp rather
     than pushing the card's contents out of step with its neighbours. */
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card:hover h3 {
  color: var(--gold);
}

.card p {
  color: var(--grey);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.card .read {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
}

.footer {
  border-top: 4px solid var(--gold);
  padding: 36px 24px;
  text-align: center;
  color: var(--grey-dark);
  font-size: 0.88rem;
}

.footer a {
  color: var(--grey);
  text-decoration: none;
  margin: 0 10px;
}

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

/* Category filter (blog index) */
.catbar { display:flex; gap:10px; flex-wrap:wrap; margin:26px 0 6px; }
.catpill { font-family:'Urbanist',sans-serif; font-weight:700; font-size:0.8rem; letter-spacing:0.08em;
  padding:9px 18px; border-radius:999px; cursor:pointer; border:2px solid rgba(255,255,255,0.18);
  background:transparent; color:#9ca3af; transition:color .2s,border-color .2s; }
.catpill:hover { color:#f4eddd; border-color:rgba(255,210,117,0.5); }
.catpill.active { color:#0a0a0a; background:#ffd275; border-color:#ffd275; }

/* AI Architects dropdown mirrors the homepage nav */
.nav-arch .nav-drop-btn { cursor: pointer; }
.nav-menu-right { left: auto; right: 0; }

/* Publication date on each blog card, under the summary */
.card-date { display: block; margin-top: auto; padding-top: 18px; font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--grey-dark); }

/* Mobile menu: one compact dropdown, short labels so nothing wraps to two lines */
.nav-burger { display: none; }
.nav-mobile { display: none; }
@media (max-width: 767px) {
  .nav-arch { display: none; }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-right: -8px; border: 0; background: transparent; color: #f4eddd; cursor: pointer; padding: 0; }
  .nav-mobile { position: absolute; top: 100%; right: 12px; min-width: 215px; background: #000; border: 1px solid rgba(255,255,255,0.1); box-shadow: 6px 6px 0 0 #000; padding: 6px 0; z-index: 60; }
  .nav-mobile:not(.open) { display: none; }
  .nav-mobile.open { display: block; }
  .nav-mobile a { display: block; padding: 11px 16px; color: #f4eddd; font-family: 'Urbanist', sans-serif; font-size: 15px; text-decoration: none; white-space: nowrap; border: 0; }
  .nav-mobile a:hover { color: #ffd275; background: rgba(255,255,255,0.05); }
  .nav-mobile .nav-mobile-sep { display: block; margin: 6px 0; border-top: 1px solid rgba(255,255,255,0.1); }
}
