/* ============================================================
   Latest Advances in AI - Stylesheet
   Modern editorial / tech-publication aesthetic
   ============================================================ */

:root {
  --bg: #f7f6f3;
  --bg-elev: #ffffff;
  --ink: #0f1419;
  --ink-2: #2a2f36;
  --muted: #5c6470;
  --muted-2: #8b94a3;
  --line: #e6e4dd;
  --line-2: #efece4;
  --accent: #d33f00;
  --accent-soft: #fff2eb;
  --tag-bg: #f1eee5;
  --tag-ink: #4a4f57;
  --shadow-sm: 0 1px 2px rgba(15, 20, 25, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 20, 25, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 20, 25, 0.10);
  --radius: 6px;
  --radius-lg: 14px;
  --serif: "Source Serif Pro", "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --max-w: 1180px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 243, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.logo-text {
  white-space: nowrap;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-primary a {
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 500;
}

.nav-primary a:hover {
  color: var(--accent);
}

/* ============ Hero ============ */
.hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--line);
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero .eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  color: var(--ink);
  max-width: 880px;
}

.hero .lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 720px;
  margin: 0 0 26px;
}

.hero-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============ Section Headers ============ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 56px 0 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
}

.section-head .sub {
  color: var(--muted);
  font-size: 15px;
}

/* ============ Article Grid ============ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.article-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line);
}

.article-card .thumb {
  display: block;
  aspect-ratio: 16/9;
  background: var(--line-2);
  overflow: hidden;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 22px 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.article-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--ink);
}

.article-card h3 a {
  color: inherit;
}

.article-card .deck {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 18px;
  flex: 1;
}

.article-card .meta {
  font-size: 13px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============ Article Page ============ */
.article-main {
  padding: 32px 0 64px;
}

.article {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  padding: 36px 0 0;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--muted);
}

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

.article-header {
  margin: 0 auto 28px;
  max-width: 780px;
}

.article-header .article-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.article-header .cat-badge {
  font-size: 12px;
  margin-bottom: 0;
}

.article-header h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--ink);
}

.article-deck {
  font-size: 19px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}

.article-cover {
  margin: 0 -28px 36px;
}

.article-cover img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  border-radius: 0;
}

.article-cover figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 12px 28px 0;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.72;
  color: var(--ink-2);
}

.article-body p {
  margin: 0 0 1.4em;
}

.article-body .lead {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1.6em;
}

.article-body h2 {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.018em;
  margin: 2em 0 0.6em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
}

.article-body h2 + p {
  margin-top: 0;
}

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body em {
  font-style: italic;
}

.article-footer {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  background: var(--tag-bg);
  color: var(--tag-ink);
  padding: 5px 12px;
  border-radius: 999px;
}

.related-prompt {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.related-prompt strong {
  color: var(--ink-2);
}

.related-prompt a {
  color: var(--accent);
  font-weight: 500;
}

/* ============ About ============ */
.about-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 0 64px;
}

.about-page h1 {
  font-family: var(--serif);
  font-size: 42px;
  letter-spacing: -0.02em;
  margin: 16px 0 20px;
}

.about-page p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 1.3em;
}

.about-page h2 {
  font-family: var(--serif);
  font-size: 26px;
  margin: 1.8em 0 0.6em;
}

.about-page ul {
  font-size: 17px;
  color: var(--ink-2);
  padding-left: 22px;
}

.about-page li {
  margin-bottom: 8px;
}

/* ============ Footer ============ */
.site-footer {
  background: #0f1419;
  color: #cfd3da;
  padding: 48px 0 36px;
  margin-top: 48px;
}

.site-footer p {
  margin: 0 0 6px;
  font-size: 14px;
}

.site-footer p:last-child {
  margin: 0;
}

.site-footer .muted {
  color: #8b94a3;
  font-size: 13px;
}

/* ============ Responsive ============ */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .header-inner { height: 56px; }
  .logo-text { font-size: 15px; }
  .nav-primary { gap: 16px; }
  .nav-primary a { font-size: 14px; }
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 36px; }
  .hero .lede { font-size: 17px; }
  .section-head h2 { font-size: 24px; }
  .article-grid { grid-template-columns: 1fr; gap: 24px; }
  .article { padding: 18px 0 0; }
  .article-header h1 { font-size: 30px; }
  .article-deck { font-size: 17px; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 24px; }
  .article-cover { margin: 0 -18px 28px; }
  .about-page h1 { font-size: 32px; }
  .about-page p { font-size: 17px; }
}

/* Print */
@media print {
  .site-header, .site-footer { display: none; }
  body { background: white; }
}
