*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: oklch(0.16 0.012 235); }

::selection { background: oklch(0.78 0.13 195 / 0.3); color: #fff; }

@keyframes slowpan { 0% { background-position: 0 0; } 100% { background-position: 60px 60px; } }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.page {
  min-height: 100vh;
  background: oklch(0.16 0.012 235);
  color: oklch(0.9 0.012 230);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  position: relative;
  overflow: hidden;
}

/* ambient layers */
.ambient { position: absolute; inset: 0; pointer-events: none; }

.ambient-grid {
  background-image:
    linear-gradient(oklch(0.92 0.02 200 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.92 0.02 200 / 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: slowpan 24s linear infinite;
}

.ambient-glow {
  top: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  inset: auto;
  background: radial-gradient(ellipse at center, oklch(0.78 0.13 195 / 0.10), transparent 65%);
  filter: blur(20px);
}

.ambient-vignette {
  background: radial-gradient(ellipse at 50% 40%, transparent 40%, oklch(0.16 0.012 235 / 0.85) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .ambient-grid { animation: none; }
}

/* content frame */
.frame {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 48px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 36px;
  border-bottom: 1px solid oklch(0.92 0.02 200 / 0.08);
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }

.monogram {
  width: 34px;
  height: 34px;
  border: 1px solid oklch(0.78 0.13 195 / 0.55);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  color: oklch(0.82 0.12 195);
  box-shadow: inset 0 0 14px oklch(0.78 0.13 195 / 0.12);
}

.brand-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: oklch(0.62 0.012 230);
}

.site-nav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: oklch(0.72 0.08 195);
  text-decoration: none;
  transition: color 0.25s;
}

.site-nav a:hover {
  color: oklch(0.9 0.1 195);
}

/* mobile nav toggle */
.nav-toggle-input {
  display: none;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 22px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: oklch(0.82 0.12 195);
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 6.5px; }
.menu-toggle span:nth-child(3) { top: 13px; }

.nav-toggle-input:checked ~ .topbar .menu-toggle span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle-input:checked ~ .topbar .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-toggle-input:checked ~ .topbar .menu-toggle span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: oklch(0.82 0.04 200);
  text-decoration: none;
  padding: 14px 4px;
  border-bottom: 1px solid oklch(0.92 0.02 200 / 0.08);
}

.nav-toggle-input:checked ~ .mobile-nav {
  display: flex;
}

.status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: oklch(0.55 0.02 200);
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: oklch(0.8 0.14 165);
  box-shadow: 0 0 8px oklch(0.8 0.14 165 / 0.8);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* hero */
.hero {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
}

.portrait-wrap { position: relative; }

.portrait-ring {
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(150deg, oklch(0.78 0.13 195 / 0.5), transparent 45%);
  pointer-events: none;
}

.portrait-frame {
  position: relative;
  border: 1px solid oklch(0.92 0.02 200 / 0.1);
  border-radius: 16px;
  padding: 12px;
  background: oklch(0.19 0.012 235 / 0.6);
}

.portrait-img {
  display: block;
  width: 100%;
  height: 460px;
  border-radius: 9px;
  object-fit: cover;
}

.corner {
  position: absolute;
  width: 16px;
  height: 16px;
}

.corner-tl {
  top: 6px;
  left: 6px;
  border-top: 1.5px solid oklch(0.82 0.12 195);
  border-left: 1.5px solid oklch(0.82 0.12 195);
  border-top-left-radius: 6px;
}

.corner-br {
  bottom: 6px;
  right: 6px;
  border-bottom: 1.5px solid oklch(0.82 0.12 195);
  border-right: 1.5px solid oklch(0.82 0.12 195);
  border-bottom-right-radius: 6px;
}

.portrait-caption {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: oklch(0.5 0.012 230);
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: oklch(0.72 0.1 195);
  margin-bottom: 22px;
}

.headline {
  margin: 0 0 8px;
  font-size: 60px;
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: oklch(0.97 0.008 230);
}

.credentials {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: oklch(0.62 0.012 230);
  margin-top: 10px;
}

.body-text {
  margin: 26px 0 0;
  font-size: 17.5px;
  line-height: 1.65;
  max-width: 46ch;
  color: oklch(0.78 0.012 230);
}

.body-text-dim {
  margin-top: 18px;
  color: oklch(0.72 0.012 230);
}

.body-text em {
  color: oklch(0.88 0.04 195);
  font-style: italic;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.chip {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: oklch(0.82 0.04 200);
  padding: 8px 14px;
  border: 1px solid oklch(0.92 0.02 200 / 0.14);
  border-radius: 999px;
  background: oklch(0.2 0.012 235 / 0.5);
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.chip:hover {
  border-color: oklch(0.78 0.13 195 / 0.6);
  color: oklch(0.9 0.1 195);
  box-shadow: 0 0 18px oklch(0.78 0.13 195 / 0.14);
}

/* book */
.book {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
  padding: 32px 0 56px;
  border-top: 1px solid oklch(0.92 0.02 200 / 0.08);
}

.book-cover-wrap { position: relative; }

.book-cover-ring {
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(150deg, oklch(0.78 0.13 195 / 0.5), transparent 45%);
  pointer-events: none;
}

.book-cover-frame {
  position: relative;
  border: 1px solid oklch(0.92 0.02 200 / 0.1);
  border-radius: 16px;
  padding: 12px;
  background: oklch(0.19 0.012 235 / 0.6);
}

.book-cover-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  object-fit: cover;
}

.book-title {
  margin: 0 0 4px;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: oklch(0.97 0.008 230);
}

/* publications & patents */
.pub-intro {
  padding: 56px 0 8px;
}

.page-title {
  margin: 0 0 18px;
  font-size: 48px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: oklch(0.97 0.008 230);
}

.pub-block {
  padding: 32px 0;
  border-top: 1px solid oklch(0.92 0.02 200 / 0.08);
}

.section-title {
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: oklch(0.97 0.008 230);
}

.patent-group-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: oklch(0.72 0.1 195);
  margin: 28px 0 14px;
}

.inline-link {
  color: oklch(0.82 0.12 195);
  transition: color 0.25s;
}

.inline-link:hover {
  color: oklch(0.9 0.1 195);
}

.patent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.patent {
  border: 1px solid oklch(0.92 0.02 200 / 0.1);
  border-radius: 12px;
  padding: 16px 18px;
  background: oklch(0.19 0.012 235 / 0.4);
}

.patent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.patent-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: oklch(0.82 0.12 195);
}

.patent-title {
  font-size: 16px;
  font-weight: 500;
  color: oklch(0.97 0.008 230);
}

.patent-desc {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: oklch(0.72 0.012 230);
}

/* footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  border-top: 1px solid oklch(0.92 0.02 200 / 0.08);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: oklch(0.5 0.012 230);
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: oklch(0.82 0.12 195);
  animation: blink 1.1s step-end infinite;
  vertical-align: middle;
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}

/* responsive: collapse to single column below ~840px */
@media (max-width: 840px) {
  .frame { padding: 24px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 32px 0;
  }

  .portrait-img { height: 340px; }

  .headline { font-size: 40px; }

  .body-text { max-width: none; }

  .book {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 24px 0 32px;
  }

  .book-cover-wrap { max-width: 280px; margin: 0 auto; }

  .book-title { font-size: 32px; }

  .topbar {
    flex-wrap: wrap;
    row-gap: 14px;
  }

  .site-nav { display: none; }

  .menu-toggle { display: block; }

  .page-title { font-size: 36px; }
}
