/* ─── RESET & VARIABLES ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:       #0d0e0f;
  --ink-soft:  #3a3d42;
  --ink-muted: #7a7f88;
  --paper:     #f5f3ee;
  --paper-alt: #ede9e2;
  --accent:    #1c3a5e;
  --accent-mid:#2e5f9e;
  --gold:      #b89a4a;
  --gold-light:#d4b96a;
  --red:       #8c2b1e;
  --border:    #d8d3ca;

  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --font-serif: 'Playfair Display', Georgia, serif;

  --radius: 3px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-mid); }

/* ─── HEADER ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 2px solid var(--gold);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 68px;
}

.site-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.logo-sub {
  font-size: 0.65rem;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  font-weight: 300;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.main-nav a.active {
  color: var(--gold-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 1.1rem;
  margin-left: auto;
}

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 80vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  background: var(--accent);
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-line {
  position: absolute;
  background: rgba(255,255,255,0.04);
}

.hero-line-1 {
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
}

.hero-line-2 {
  left: 0; right: 0;
  top: 33%;
  height: 1px;
}

.hero-line-3 {
  left: 0; right: 0;
  top: 66%;
  height: 1px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80%;
  height: 140%;
  background: radial-gradient(ellipse, rgba(184,154,74,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 5rem 3rem 5rem 6rem;
  animation: fadeUp 0.8s ease both;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  max-width: 36ch;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.8;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--gold-light);
  color: var(--ink);
  transform: translateY(-1px);
}

.hero-aside {
  position: relative;
  z-index: 2;
  padding: 5rem 6rem 5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  border-left: 1px solid rgba(255,255,255,0.1);
  animation: fadeUp 0.8s 0.15s ease both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  margin-top: 0.3rem;
}

/* ─── POSTS SECTION ─────────────────────────────────── */
.posts-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-header {
  margin-bottom: 3rem;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: 1px solid var(--gold);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--ink);
}

.posts-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.post-card--featured {
  border-top: 3px solid var(--gold);
  background: var(--ink);
  color: rgba(255,255,255,0.85);
}

.post-card--featured .post-card-title a {
  color: #fff;
}

.post-card--featured .post-card-excerpt {
  color: rgba(255,255,255,0.65);
}

.post-card--featured .post-card-link {
  color: var(--gold-light);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.post-card-meta time {
  font-size: 0.68rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.post-card--featured .post-card-meta time {
  color: rgba(255,255,255,0.4);
}

.post-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--ink);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.post-tag--case {
  background: var(--accent);
  color: #fff;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.35;
}

.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.65;
  flex: 1;
}

.post-card-link {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* ─── ABOUT STRIP ───────────────────────────────────── */
.about-strip {
  background: var(--paper-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-strip-text h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-strip-text p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.btn-secondary {
  display: inline-block;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

.about-strip-quote blockquote {
  border-left: 3px solid var(--gold);
  padding: 1.5rem 2rem;
  background: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.about-strip-quote blockquote p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.about-strip-quote blockquote cite {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-style: normal;
}

/* ─── PAGE HERO ─────────────────────────────────────── */
.page-hero {
  background: var(--accent);
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.page-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.page-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #fff;
  line-height: 1.2;
  max-width: 70ch;
}

/* ─── PAGE CONTENT ──────────────────────────────────── */
.page-content {
  padding: 4rem 2rem;
}

.content-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.content-wrap--narrow {
  max-width: 780px;
}

.content-block {
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
}

.content-block:last-child {
  border-bottom: none;
}

.content-block h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.content-block p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.85;
  margin-bottom: 1rem;
}

.styled-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.styled-list li {
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding-left: 1.5rem;
  position: relative;
}

.styled-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gold);
}

.styled-list li strong {
  color: var(--ink);
}

/* ─── PUBLICATIONS ──────────────────────────────────── */
.pub-section {
  margin-bottom: 4rem;
}

.pub-section-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--gold);
}

.pub-section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.pub-section-header p {
  font-size: 0.85rem;
  color: var(--ink-muted);
  max-width: 70ch;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-item {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.75rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 1rem 2rem;
  align-items: start;
  transition: box-shadow 0.2s;
}

.pub-item:hover {
  box-shadow: var(--shadow);
}

.pub-item-meta {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pub-item-meta time {
  font-size: 0.68rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.pub-tag {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}

.pub-tag--brief {
  background: var(--red);
}

.pub-item-body {
  grid-column: 1;
}

.pub-item-body h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.pub-author {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-mid);
  margin-bottom: 0.5rem !important;
}

.pub-abstract {
  font-size: 0.83rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.btn-download {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}

.btn-download:hover {
  background: var(--gold-light);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-download-icon {
  font-size: 1rem;
  line-height: 1;
}

/* ─── PUB CTA GRID ──────────────────────────────────── */
.pub-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

.pub-cta-card {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.pub-cta-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s;
  transform-origin: left;
}

.pub-cta-card:hover {
  background: #1a3a6a;
  transform: translateY(-2px);
}

.pub-cta-card:hover::before {
  transform: scaleX(1);
}

.pub-cta-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.pub-cta-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.35;
  color: #fff;
  flex: 1;
}

.pub-cta-arrow {
  font-size: 1.25rem;
  color: var(--gold-light);
}

/* ─── CS INTRO ──────────────────────────────────────── */
.cs-intro {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.cs-intro-text {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 75ch;
}

/* ─── EXTERNAL LINK CARD ────────────────────────────── */
.external-link-card {
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1.5rem;
}

.external-link-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

.external-link-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.external-link-card p {
  font-size: 0.83rem;
  color: var(--ink-soft);
  margin: 0 !important;
}

/* ─── PAGE NAV PAIR ─────────────────────────────────── */
.page-nav-pair {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.page-nav-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  transition: color 0.2s;
}

.page-nav-link:hover { color: var(--accent-mid); }

/* ─── FOOTER ─────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  margin-top: 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  flex-shrink: 0;
}

.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.footer-brand p {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.15s;
}

.footer-nav a:hover { color: #fff; }

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-social a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.15s;
}

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

.footer-bottom {
  background: rgba(0,0,0,0.3);
  text-align: center;
  padding: 1rem 2rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    padding: 4rem 2rem 2rem;
  }

  .hero-aside {
    flex-direction: row;
    padding: 2rem;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    justify-content: space-around;
  }

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

  .about-strip-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pub-item {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .btn-download {
    grid-row: auto;
    grid-column: 1;
    align-self: start;
    width: fit-content;
  }

  .pub-cta-grid {
    grid-template-columns: 1fr;
  }

  .external-link-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 1rem;
  }

  .main-nav { display: none; }
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--ink);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
    z-index: 99;
  }

  .nav-toggle { display: flex; }

  .page-hero {
    padding: 3rem 1.5rem 2.5rem;
  }

  .page-content {
    padding: 2.5rem 1.5rem;
  }

  .hero-content {
    padding: 3rem 1.5rem 2rem;
  }

  .section-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .page-nav-pair {
    flex-direction: column;
    gap: 0.75rem;
  }
}
