@import url("https://fonts.googleapis.com/css2?family=Ibarra+Real+Nova:wght@400;500;600&family=Inter:wght@400;500;600&display=swap");

:root {
  --paper: #f4f1ea;
  --ink: #181616;
  --muted: #6b6864;
  --line: rgba(24, 22, 22, 0.14);
  --accent: #d8c7f5;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: #000 url('./assets/Portfolio Background.png') center/cover fixed no-repeat;
  line-height: 1.7;
}

.page-shell {
  width: min(100%, 1260px);
  margin: 0 auto;
  padding: 48px 20px 96px;
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: rgba(255,255,255,0.86);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.back-link:hover {
  text-decoration: underline;
}

.article-shell {
  width: min(100%, 1020px);
  margin: 0 auto;
  background: var(--paper);
  padding: 56px 56px 72px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.32);
}

.article-header {
  margin-bottom: 40px;
}

.eyebrow,
.meta-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
}

.article-header h1,
.article-section h2 {
  font-family: "Ibarra Real Nova", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.article-header h1 {
  font-size: clamp(34px, 5vw, 50px);
  line-height: 0.97;
  margin: 16px 0 18px;
  max-width: 12ch;
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: #3b3735;
  max-width: 48ch;
}

.article-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 860px;
  gap: 18px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.article-meta p,
.article-section p,
figcaption,
.callout li,
.metrics-block dt,
.metrics-block dd,
.list-block li {
  margin: 0;
  font-size: 16px;
}

.article-meta p {
  margin-top: 8px;
  color: #302c29;
}

.hero-figure,
.wide-figure,
.comparison-grid,
.preview-grid,
.preview-grid-three {
  margin: 0 0 42px;
}

.hero-figure,
.wide-figure {
  margin-left: auto;
  margin-right: auto;
}

.hero-figure img,
.wide-figure img,
.comparison-grid img,
.preview-grid img,
.preview-grid-three img {
  width: 100%;
  display: block;
  background: #e9e4db;
}

.preview-figure {
  max-width: 860px;
}

.preview-figure--narrow {
  max-width: 760px;
}

.preview-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.preview-button img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms ease;
}

.preview-button:hover img {
  transform: scale(1.014);
  filter: contrast(1.01);
}

.preview-button:focus-visible {
  outline: 2px solid rgba(24, 22, 22, 0.35);
  outline-offset: 4px;
}

.preview-button--hero img {
  max-height: 520px;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.article-section {
  margin-bottom: 42px;
}

.article-section h2 {
  font-size: 32px;
  line-height: 1.05;
  margin: 0 0 18px;
}

.article-section p + p {
  margin-top: 16px;
}

.article-section--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 28px;
  align-items: start;
}

.callout,
.metrics-block,
.list-block {
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.45);
}

.callout ul,
.list-block ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.callout li + li,
.list-block li + li {
  margin-top: 10px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.preview-grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.metrics-block dl {
  margin: 14px 0 0;
  display: grid;
  gap: 14px;
}

.metrics-block div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.metrics-block div:first-child {
  border-top: 0;
  padding-top: 0;
}

.metrics-block dt {
  color: var(--muted);
}

.metrics-block dd {
  margin-top: 6px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.note {
  color: var(--muted);
  font-size: 15px;
  margin-top: 18px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.no-scroll { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1000;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.modal__img {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  display: block;
  background: #111;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  transform: translateY(10px) scale(0.985);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal[aria-hidden="false"] .modal__img {
  transform: none;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .preview-button img, .modal__img {
    transition: none !important;
    transform: none !important;
  }

  [data-reveal] {
    opacity: 1 !important;
  }
}

@media (max-width: 820px) {
  .article-shell {
    padding: 34px 24px 48px;
  }

  .article-meta,
  .article-section--split,
  .comparison-grid,
  .preview-grid,
  .preview-grid-three {
    grid-template-columns: 1fr;
  }

  .article-header h1 {
    max-width: none;
  }
}
