/* ============================================
   Inference Research
   ============================================ */

:root {
  --white: #ffffff;
  --black: #0a0a0a;
  --grey-100: #f5f5f5;
  --grey-300: #d4d4d4;
  --grey-500: #737373;
  --grey-700: #404040;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --page-pad: clamp(24px, 5vw, 80px);
}

/* ============================================
   Reset
   ============================================ */

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

ul { list-style: none; }

::selection {
  background: var(--black);
  color: var(--white);
}

/* ============================================
   Header / Nav
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--grey-300);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 var(--page-pad);
}

.nav-wordmark {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 12px;
  font-weight: 400;
  color: var(--grey-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--black);
  transition: width 0.4s var(--ease);
}

.nav-links a:hover {
  color: var(--black);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--page-pad);
  padding-top: 56px;
}

.hero-title {
  font-size: clamp(48px, 12vw, 160px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: 40px;
}

.hero-line {
  display: block;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.hero-line span {
  display: inline-block;
}

.hero-tagline {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 400;
  color: var(--grey-500);
  letter-spacing: 0.02em;
}

/* ============================================
   Rules (dividers)
   ============================================ */

.rule {
  padding: 0 var(--page-pad);
}

.rule-line {
  height: 1px;
  background: var(--grey-300);
}

/* ============================================
   Block layout (section grid)
   ============================================ */

.block {
  padding: clamp(60px, 10vw, 120px) var(--page-pad);
}

.block-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}

.block-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.block-number {
  font-size: 11px;
  font-weight: 400;
  color: var(--grey-300);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.block-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-500);
}

/* ============================================
   Prose
   ============================================ */

.prose {
  font-size: 15px;
  line-height: 1.8;
  color: var(--grey-700);
  margin-bottom: 24px;
  max-width: 600px;
}

.prose:last-child {
  margin-bottom: 0;
}

.prose-emphasis {
  color: var(--black);
  font-weight: 500;
}

/* ============================================
   Articles (Writing)
   ============================================ */

.article-list {
  display: flex;
  flex-direction: column;
}

.article {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  align-items: start;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--grey-100);
  transition: padding-left 0.4s var(--ease);
}

.article:first-child {
  border-top: 1px solid var(--grey-100);
}

.article:hover {
  padding-left: 12px;
}

.article:hover .article-arrow {
  opacity: 1;
  transform: translateX(0);
}

.article:hover .article-title {
  color: var(--black);
}

.article-index {
  font-size: 11px;
  font-weight: 400;
  color: var(--grey-300);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  padding-top: 3px;
}

.article-body {
  min-width: 0;
}

.article-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--grey-700);
  transition: color 0.3s var(--ease);
}

.article-summary {
  font-size: 13px;
  color: var(--grey-500);
  line-height: 1.5;
}

.article-date {
  font-size: 11px;
  color: var(--grey-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 4px;
}

.article-arrow {
  font-size: 16px;
  color: var(--black);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  padding-top: 2px;
}

.article--upcoming .article-title,
.article--upcoming .article-summary {
  color: var(--grey-300);
}

.article--upcoming .article-index {
  color: var(--grey-100);
}

.article--upcoming:hover .article-title {
  color: var(--grey-300);
}

/* ============================================
   Contact
   ============================================ */

.contact-line {
  font-size: 15px;
  color: var(--grey-500);
  margin-bottom: 16px;
}

.contact-email {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 300;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--grey-300);
  transition: background 0.3s var(--ease);
}

.contact-email:hover::after {
  background: var(--black);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  border-top: 1px solid var(--grey-300);
  padding: 24px var(--page-pad);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy,
.footer-social {
  font-size: 11px;
  color: var(--grey-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-social {
  transition: color 0.3s var(--ease);
}

.footer-social:hover {
  color: var(--black);
}

/* ============================================
   Reveal animations
   ============================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.block {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.block.revealed {
  opacity: 1;
  transform: translateY(0);
}

.rule-line {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}

.rule-line.revealed {
  transform: scaleX(1);
}

/* Stagger articles */
.article {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease),
              padding-left 0.4s var(--ease);
}

.article.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .nav {
    height: 48px;
  }

  .nav-wordmark {
    font-size: 12px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 11px;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-title {
    margin-bottom: 24px;
  }

  .block-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .block-sidebar {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .article {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }

  .article-index,
  .article-arrow {
    display: none;
  }

  .article-date {
    padding-top: 0;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 16px;
  }

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

  .article-date {
    margin-top: -4px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
