/* IRIS Research Lab — single stylesheet */

@font-face {
  font-family: "Redaction 35";
  src: url("fonts/redaction-35-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --text: #e5e5e5;
  --accent: #6c5ce7;
  --accent-teal: #00b894;
  --muted: #a0a0a0;
  --border: #333333;
  --max-width: 72rem;
  --content-width: 42rem;
  --font-display: "Redaction 35", Georgia, serif;
  --font-body: "JetBrains Mono", ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

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

/* ── Layout ── */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(100% - 3rem, var(--max-width));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 3rem, var(--content-width));
  margin-inline: auto;
}

/* ── Header / Nav ── */

.site-header {
  border-bottom: 1px dashed var(--border);
  padding: 1.25rem 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px dashed var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

/* ── Main content ── */

main {
  flex: 1;
  padding: 4rem 0 6rem;
}

/* ── Typography ── */

.display-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
  margin: 0 0 1.5rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin: 0 0 3rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-teal);
}

.body-copy {
  margin: 0;
  max-width: 38rem;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.body-copy + .body-copy {
  margin-top: 1.25rem;
}

/* ── Home sections ── */

.home-section {
  padding: 4rem 0;
  border-bottom: 1px dashed var(--border);
}

.home-section:first-of-type {
  padding-top: 3rem;
}

.home-section:last-of-type {
  border-bottom: none;
}

.home-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.85fr);
  gap: 2.5rem;
  align-items: start;
}

.home-row__media {
  margin: 0;
}

.home-row__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border);
  filter: grayscale(100%) sepia(30%) hue-rotate(210deg) saturate(1.4) brightness(0.9);
}

.home-row__content .section-heading {
  margin-bottom: 1.25rem;
}

.home-row__content .body-copy {
  max-width: none;
}

/* ── IRIS page ── */

body:has(main.iris-page) .site-header {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.iris-page {
  position: relative;
  min-height: calc(100vh - 8rem);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.iris-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/images/iris-bg-blake.png") center / cover no-repeat;
  opacity: 0.08;
  filter: blur(1px) grayscale(100%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.iris-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    transparent 28%,
    transparent 72%,
    var(--bg) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.iris-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 0;
}

.iris-content .display-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.iris-content .mono-label {
  display: block;
  margin-bottom: 2.5rem;
  color: var(--muted);
}

.iris-content .body-copy {
  max-width: none;
  text-align: center;
  margin-inline: auto;
}

.iris-content .body-copy + .body-copy {
  margin-top: 1.75rem;
}

.iris-links {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  text-align: left;
  display: inline-block;
}

.iris-links li {
  margin-bottom: 0.75rem;
}

.iris-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.iris-links a::after {
  content: " →";
  color: var(--muted);
}

.iris-links a:hover::after {
  color: var(--accent);
}

/* ── Research table ── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
}

.research-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.research-table th,
.research-table td {
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
}

.research-table th {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.research-table td:first-child {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.research-table a {
  white-space: nowrap;
}

.research-table tbody tr:hover {
  background: rgba(108, 92, 231, 0.04);
}

/* ── Blog grid ── */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.blog-card {
  border: 1px dashed var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.15s ease;
}

.blog-card:hover {
  border-color: var(--accent);
}

.blog-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  flex: 1;
  min-width: 0;
}

.blog-card-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.blog-card-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-decoration: none;
  align-self: flex-start;
}

/* ── Blog post (article page) ── */

.blog-post {
  max-width: 40rem;
}

.blog-post__back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.blog-post__back:hover {
  color: var(--accent);
}

.blog-post__header {
  margin-bottom: 2.5rem;
}

.blog-post__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.25;
  margin: 0 0 1rem;
}

.blog-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.blog-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-post__tag {
  border: 1px dashed var(--border);
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-teal);
}

.blog-post__body .body-copy {
  max-width: none;
  margin-bottom: 1.25rem;
}

.blog-post__body .body-copy:last-child {
  margin-bottom: 0;
}

.blog-formula {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  white-space: pre-wrap;
}

.blog-post__body em {
  font-style: italic;
  color: var(--text);
}

/* ── Contact ── */

.contact-block {
  max-width: 32rem;
}

.contact-block .display-title {
  margin-bottom: 2rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
}

.contact-list li {
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.contact-credentials {
  border-top: 1px dashed var(--border);
  padding-top: 2rem;
  margin-top: 2rem;
}

.contact-credentials p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── Footer ── */

.site-footer {
  border-top: 1px dashed var(--border);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.footer-inner a {
  color: var(--muted);
  text-decoration: none;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
}

.footer-sep {
  color: var(--border);
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .site-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 0.5rem;
  }

  .site-nav.is-open {
    display: flex;
  }

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

  .home-section {
    padding: 3rem 0;
  }

  .home-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  main {
    padding: 2.5rem 0 4rem;
  }

  .research-table td:first-child {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
