@font-face {
  font-family: 'Chomsky';
  src: url('fonts/Chomsky.woff2') format('woff2'),
    url('fonts/Chomsky.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4efe4;
  --paper-dim: #e9e0d0;
  --ink: #1c1a16;
  --ink-soft: #4a453c;
  --rule: #1c1a16;
  --rule-faint: #d5cbb8;
  --accent: #a3402f;
  --accent-soft: #a3402f1a;
  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
}

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

html,
body {
  scroll-behavior: smooth;
  overflow-x: clip;
  width: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
video,
iframe,
picture {
  max-width: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.015) 0px, transparent 1px, transparent 2px),
    radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.03), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(0, 0, 0, 0.025), transparent 45%);
  pointer-events: none;
  z-index: 1000;
  mix-blend-mode: multiply;
}

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

::selection {
  background: var(--accent);
  color: var(--paper);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

@media (max-width:700px) {
  .wrap {
    padding: 0 16px;
  }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow.accent {
  color: var(--accent);
  font-weight: 600;
}

.rule {
  border: none;
  border-top: 1px solid var(--rule);
}

.rule-faint {
  border: none;
  border-top: 1px solid var(--rule-faint);
}

/* ===== Masthead ===== */
.masthead-bar {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}

.masthead-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.masthead-title {
  text-align: center;
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--rule);
}

.masthead-title h1,
.portfolio-times-box h1 {
  font-family: 'Chomsky', var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 88px);
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
}

.portfolio-times-box {
  width: 100%;
  border: 2px solid var(--rule);
  padding: 10px;
  text-align: center;
  box-sizing: border-box;
  margin-bottom: 14px;
  background-image: url('images/image.png');
  background-repeat: repeat;
  animation: navBgSlide 32s linear infinite;
}

.masthead-sub {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 10px;
  color: var(--ink-soft);
}

.masthead-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.masthead-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 14px;
  color: var(--rule-faint);
}

/* ===== Nav ===== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  background-color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: hidden;
}

@keyframes navBgSlide {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -1000px 0;
  }
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('images/image.png');
  background-repeat: repeat;
  filter: blur(0px);
  opacity: 0.85;
  z-index: 0;
  pointer-events: none;
  animation: navBgSlide 32s linear infinite;
  transition: opacity 0.4s ease;
}

.portfolio-times-box:hover,
.nav:hover::before {
  animation-play-state: paused;
}

.nav.is-stuck::before {
  opacity: 0;
  animation-play-state: paused;
}

.nav>.wrap {
  position: relative;
  z-index: 1;
}

.nav-logo {
  font-family: 'Chomsky', var(--serif);
  font-weight: 400;
  font-size: 26px;
}

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

.nav-links a {
  font-family: 'Chomsky', var(--serif);
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-weight: 400;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.nav-links a.btn {
  font-family: 'Chomsky', var(--serif);
  font-size: 18px;
  border-bottom: 1px solid var(--ink);
  padding: 6px 18px;
  height: 36px;
  box-sizing: border-box;
}

.nav-links a.btn:hover {
  border-bottom-color: var(--accent);
}

.btn {
  font-family: 'Chomsky', var(--serif);
  font-size: 18px;
  letter-spacing: 0.02em;
  padding: 6px 18px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

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

  .hamburger {
    display: flex;
  }
}

/* ===== Hero ===== */
.hero {
  padding: 56px 0 60px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 56px;
  padding-top: 28px;
}

@media (max-width:860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.case-no {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-grid h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-grid h2 em {
  font-style: italic;
  color: var(--accent);
}

.dropcap {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  border-left: 2px solid var(--ink);
  padding-left: 20px;
  margin: 26px 0;
  color: var(--ink-soft);
  max-width: 520px;
}

.dropcap-2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  border-left: 2px solid var(--ink);
  padding-left: 20px;
  margin: 26px 0;
  color: var(--ink-soft);
  max-width: 520px;
}

.dropcap::first-letter {
  font-family: 'Chomsky', var(--serif);
  font-style: normal;
  font-size: 3.6em;
  float: left;
  line-height: 0.8;
  margin-right: 10px;
  margin-top: 2px;
  color: var(--ink);
}

.byline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.byline strong {
  font-family: 'Chomsky', var(--serif);
  font-size: 15px;
  font-weight: 400;
  text-transform: none;
  color: var(--ink);
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width:480px) {
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .btn,
  .hero-ctas a.btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

.hero-side img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border: 1px solid var(--rule);
  filter: grayscale(1) contrast(1.05);
  background: var(--paper-dim);
}

.hero-caption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 10px;
}

.hero-side p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
  margin-top: 18px;
  color: var(--ink-soft);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 44px;
}

.stat-strip div {
  padding: 18px 22px;
  border-right: 1px solid var(--rule-faint);
}

.stat-strip div:last-child {
  border-right: none;
}

.stat-strip .big {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
}

.stat-strip .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}

@media (max-width:700px) {
  .stat-strip {
    grid-template-columns: 1fr 1fr;
  }

  .stat-strip div {
    border-bottom: 1px solid var(--rule-faint);
  }
}

@media (max-width:400px) {
  .stat-strip {
    grid-template-columns: 1fr;
  }
}

/* ===== Section header ===== */
.section {
  padding: 64px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 36px;
}

.section-head h3 {
  font-family: 'Chomsky', var(--serif);
  font-size: 60px;
  font-weight: 400;
  margin-top: 6px;
}

.section-head .right {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: right;
}

@media (max-width:650px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-head h3 {
    font-size: clamp(34px, 9vw, 48px);
  }

  .section-head .right {
    text-align: left;
  }
}

/* ===== Exhibits (Work) ===== */
.exhibit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule-faint);
  color: inherit;
  text-decoration: none;
}

.exhibit:first-child {
  padding-top: 0;
}

@media (max-width:800px) {
  .exhibit {
    grid-template-columns: 1fr;
  }
}

.exhibit-shot {
  position: relative;
  border: 1px solid var(--rule);
  background: linear-gradient(135deg, #3a3630, #221f1a);
  aspect-ratio: 16/10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.exhibit-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper-dim);
  display: block;
  transition: transform .15s ease-out, transform-origin .15s ease-out;
  pointer-events: none;
}

#heroTilt img {
  object-fit: cover;
}

#heroTilt::after {
  display: none;
}

.exhibit-tape {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 70px;
  height: 20px;
  background: rgba(230, 222, 200, 0.55);
}

.exhibit-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--paper);
  border: 1px solid var(--paper);
  padding: 2px 8px;
  text-transform: uppercase;
}

.exhibit-src {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: #655f52;
}

.exhibit-glyph {
  font-family: var(--serif);
  font-style: italic;
  color: #8a8172;
  font-size: 15px;
  text-align: center;
  padding: 0 30px;
}

.exhibit-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}

.exhibit-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin: 6px 0 10px;
}

.exhibit-body h4 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 12px;
}

.exhibit-body p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  border: 1px solid var(--rule);
  padding: 4px 9px;
  text-transform: none;
}

.exhibit-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}

.open-case {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.open-case:hover {
  text-decoration: underline;
}

/* ===== Lab report (stack) ===== */
.lab-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
}

.lab-table thead th {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: 14px 18px;
  font-weight: 500;
}

.lab-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule-faint);
  font-family: var(--serif);
  font-size: 16px;
}

.lab-table tbody tr:nth-child(odd) {
  background: var(--paper-dim);
}

.lab-table td.code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
}

.lab-table td.det {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  padding: 4px 10px;
  display: inline-block;
}

.badge.core {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.lab-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-align: right;
  margin-top: 14px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

/* ===== Career ledger ===== */
.ledger-row {
  display: grid;
  grid-template-columns: 160px 1fr 1.4fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule-faint);
}

.ledger-row:first-child {
  border-top: 1px solid var(--rule);
}

@media (max-width:760px) {
  .ledger-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.ledger-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  padding-top: 4px;
}

.ledger-role h4 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
}

.ledger-role .org {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
}

.ledger-desc {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
}

@media (max-width:760px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  padding: 44px;
  border-right: 1px solid var(--rule);
}

@media (max-width:760px) {
  .contact-form,
  .contact-side {
    padding: 24px 18px;
  }
  .contact-form {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
}

.contact-form h4 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
}

.contact-form>p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-bottom: 26px;
  max-width: 440px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

@media (max-width:500px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .form-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .form-foot button {
    width: 100%;
  }
}

label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  background: var(--paper-dim);
  border: 1px solid var(--rule-faint);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 110px;
  margin-bottom: 22px;
}

.form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-foot .eyebrow {
  text-transform: none;
  letter-spacing: 0.03em;
}

.contact-side {
  padding: 44px;
}

.side-block {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule-faint);
}

.side-block:last-of-type {
  border-bottom: none;
}

.side-block h5 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.side-block .val {
  font-family: var(--serif);
  font-size: 18px;
}

.side-block .sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.social-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.social-row a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.social-row a:hover {
  background: var(--ink);
  color: var(--paper);
}

.social-row a[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
  border: 1px solid var(--paper-dim);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.social-row a[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* ===== Footer ===== */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 0 30px;
  margin-top: 40px;
}

.footer-top {
  text-align: center;
  padding-bottom: 34px;
  border-bottom: 1px solid #3a352c;
  margin-bottom: 30px;
}

.footer-top h2 {
  font-family: 'Chomsky', var(--serif);
  font-size: 48px;
  font-weight: normal;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 30px;
  border-bottom: 1px solid #3a352c;
}

@media (max-width:760px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-top h2 {
    font-size: 32px;
  }
}

.footer-grid p {
  color: #b8b0a0;
  font-size: 13.5px;
  line-height: 1.65;
  max-width: 320px;
}

.footer-grid h6 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a917f;
  margin-bottom: 14px;
}

.footer-grid a {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--paper);
  margin-bottom: 10px;
}

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

.stamp {
  display: block;
  margin: 26px auto 0;
  width: fit-content;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 8px 20px;
  transform: rotate(-3deg);
  letter-spacing: 0.1em;
  font-size: 13px;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: #8a8172;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Scroll progress bar ===== */
.scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 2000;
  transition: width .1s linear;
}

/* ===== Ticker ===== */
.ticker {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.ticker-track {
  display: inline-flex;
  gap: 0;
  animation: tickerScroll 32s linear infinite;
  padding: 8px 0;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d8d0bf;
}

.ticker-item .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

@keyframes tickerScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ===== Mobile nav ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform .3s ease, opacity .3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 82vw);
  background: var(--paper);
  border-left: 1px solid var(--rule);
  z-index: 1500;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .4s cubic-bezier(.16, .8, .3, 1), visibility 0.4s;
  padding: 90px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer a {
  font-family: 'Chomsky', var(--serif);
  font-size: 28px;
  font-weight: normal;
  border-bottom: 1px solid var(--rule-faint);
  padding-bottom: 14px;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 22, 0.4);
  z-index: 1400;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width:800px) {
  .hamburger {
    display: flex;
  }
}

/* ===== Custom cursor for exhibits ===== */
.exhibit-shot {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'><circle cx='14' cy='14' r='9' fill='none' stroke='%23f2ede2' stroke-width='2.5'/><line x1='21' y1='21' x2='30' y2='30' stroke='%23f2ede2' stroke-width='2.5' stroke-linecap='round'/></svg>") 17 17, zoom-in;
}

/* ===== Continuous idle motion ===== */
@keyframes driftGrain {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }

  100% {
    background-position: 120px 80px, 40px -30px, -60px 50px;
  }
}

body::before {
  animation: driftGrain 40s linear infinite;
}

@keyframes stampWobble {

  0%,
  100% {
    transform: rotate(-3deg);
  }

  50% {
    transform: rotate(-1deg);
  }
}

.stamp.settled {
  animation: stampWobble 6s ease-in-out infinite;
}

@keyframes floatSlow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.hero-side {
  animation: floatIn .8s cubic-bezier(.16, .8, .3, 1) .5s both;
}

.load-seq .hero-side img,
.load-seq .hero-side .exhibit-shot {}

/* ===== Parallax tilt ===== */
.tilt-target {
  transition: transform .15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

/* ===== Nav underline sweep ===== */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .25s ease;
}

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

/* ===== Chip pop stagger on card hover ===== */
.chips {}

/* ===== Number ticker in stat-strip ===== */
.stat-strip .big {
  display: inline-block;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.16, .8, .3, 1), transform .7s cubic-bezier(.16, .8, .3, 1);
}

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


/* ===== Entrance sequence ===== */
@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wipeRule {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes stampSlam {
  0% {
    opacity: 0;
    transform: rotate(-3deg) scale(2.2);
  }

  55% {
    opacity: 1;
    transform: rotate(-3deg) scale(0.92);
  }

  75% {
    transform: rotate(-3deg) scale(1.05);
  }

  100% {
    opacity: 1;
    transform: rotate(-3deg) scale(1);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.load-seq .masthead-bar {
  animation: dropIn .5s ease both;
}

.load-seq .masthead-title {
  animation: dropIn .6s ease .08s both;
}

.load-seq .nav {
  animation: dropIn .5s ease .15s both;
}

.load-seq .hero-top {
  animation: riseIn .6s cubic-bezier(.16, .8, .3, 1) .25s both;
}

.load-seq .case-no {
  animation: riseIn .6s cubic-bezier(.16, .8, .3, 1) .35s both;
}

.load-seq .hero-grid h2 {
  animation: riseIn .7s cubic-bezier(.16, .8, .3, 1) .45s both;
}

.load-seq .dropcap {
  animation: riseIn .6s cubic-bezier(.16, .8, .3, 1) .58s both;
}

.load-seq .byline {
  animation: riseIn .6s cubic-bezier(.16, .8, .3, 1) .68s both;
}

.load-seq .hero-ctas {
  animation: riseIn .6s cubic-bezier(.16, .8, .3, 1) .76s both;
}

.load-seq .hero-side {
  animation: floatIn .8s cubic-bezier(.16, .8, .3, 1) .5s both;
}

.load-seq .stat-strip {
  animation: riseIn .6s cubic-bezier(.16, .8, .3, 1) .85s both;
}

.type-cursor::after {
  content: "|";
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

/* ===== Nav interactions ===== */
.nav-links a {
  transition: color .25s ease, border-color .25s ease;
}

.btn {
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}

.btn:active {
  transform: scale(.96);
}

.btn-outline {
  transition: background .2s ease, color .2s ease, transform .15s ease;
}

.btn-outline:active {
  transform: scale(.96);
}

/* ===== Stat strip count-up ===== */
.stat-strip div {
  transition: background .25s ease;
}

.stat-strip div:hover {
  background: var(--paper-dim);
}

/* ===== Exhibit hover ===== */
.exhibit {}

.exhibit-shot {
  cursor: zoom-in;
  overflow: hidden;
}

.exhibit-glyph,
.exhibit-tape,
.exhibit-label,
.exhibit-src {
  transition: transform .5s cubic-bezier(.16, .8, .3, 1);
}

.exhibit-shot:hover .exhibit-glyph {
  transform: scale(1.06);
}

.exhibit-shot:hover .exhibit-tape {
  transform: translateX(-50%) rotate(-1.5deg) translateY(-2px);
}

.exhibit-shot::after {
  display: none;
}

.exhibit-body h4 {
  transition: color .2s ease;
}

.exhibit:hover .exhibit-body h4 {
  color: var(--accent);
}

.chip {
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.chip:hover {
  background: var(--ink);
  color: var(--paper);
}

.open-case {
  position: relative;
}

.open-case::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .25s ease;
}

.open-case:hover::after {
  width: 100%;
}

.table-scroll tbody tr {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease, background .2s ease;
}

.table-scroll.in tbody tr {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Lab table row interactions ===== */
.lab-table tbody tr {
  transition: background .2s ease, transform .2s ease;
}

.lab-table tbody tr:hover {
  background: var(--accent-soft);
  transform: translateX(3px);
}

.badge {
  transition: transform .2s ease;
}

.lab-table tbody tr:hover .badge {
  transform: scale(1.05);
}

/* ===== Ledger row interactions ===== */
.ledger-row {
  transition: padding-left .3s ease, background .3s ease;
}

.ledger-row:hover {
  padding-left: 10px;
  background: var(--paper-dim);
}

.ledger-row:hover .ledger-role h4 {
  color: var(--accent);
}

.ledger-role h4 {
  transition: color .2s ease;
}

/* ===== Form focus micro-interaction ===== */
input,
textarea {
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input:focus,
textarea:focus {
  background: var(--paper);
  box-shadow: 0 2px 0 var(--accent);
}

/* ===== Section header underline draw ===== */
.section-head {
  position: relative;
}

.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--rule);
  transform-origin: left;
  animation: none;
}

.section-head.in::after {
  animation: wipeRule .8s cubic-bezier(.16, .8, .3, 1) both;
}

.section-head h3 {
  position: relative;
}

/* ===== Stamp animation ===== */
.stamp {
  opacity: 0;
}

.stamp.in {
  animation: stampSlam .7s cubic-bezier(.34, 1.56, .64, 1) both;
}

/* ===== Social icons ===== */
.social-row a {
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.social-row a:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
