:root {
  --bg: #0b0b0c;
  --bg-alt: #121214;
  --panel: rgba(255, 255, 255, 0.04);
  --text: #f4f1ea;
  --muted: #b8b1a5;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #b7ff5d;
  --max-width: 1380px;
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  width: min(calc(100% - 4rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11, 11, 12, 0.7);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.1rem;
}

.brand-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-link {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.icon-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

.icon-link svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 2rem 0 2rem;
  background:
    radial-gradient(circle at top left, rgba(183, 255, 93, 0.08), transparent 28%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02), transparent 30%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2,
.site-footer h2 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--solid {
  background: var(--accent);
  color: #0b0b0c;
  border-color: transparent;
}

.button--ghost {
  color: var(--text);
}

.hero-panel {
  display: flex;
  justify-content: center;
}

.hero-portrait {
  display: flex;
  justify-content: center;
  align-items: center;
}

#portrait-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 65vh;
  border-radius: var(--radius);
}

.hero-panel__inner {
  width: min(100%, 380px);
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-label {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.7rem;
}

.section {
  padding: 7rem 0;
  border-top: 1px solid var(--line);
}

.section--alt {
  background: var(--bg-alt);
}

.section-head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.section h2,
.site-footer h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  max-width: 12ch;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-card {
  display: block;
  min-height: 250px;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(183, 255, 93, 0.45);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.project-meta {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-card h3 {
  margin: 0 0 0.9rem;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.project-card p:not(.project-meta) {
  margin: 0;
  color: var(--muted);
  max-width: 48ch;
}

.project-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.prose {
  max-width: 58ch;
}

.prose p {
  margin-top: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.tag-grid span,
.tag-grid .tag-link {
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.tag-link:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.tag-link--accent {
  background: var(--accent);
  color: #0b0b0c;
  border-color: transparent;
}

.tag-link--accent:hover {
  background: #c8ff7e;
  color: #0b0b0c;
}

/* Publications */
.pub-list {
  display: grid;
  gap: 1.5rem;
}

.pub-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.pub-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0b0c;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pub-badge--prep {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.pub-details h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.pub-authors {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.pub-venue {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.pub-links {
  display: flex;
  gap: 0.5rem;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pub-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Prose links */
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.2s ease;
}

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

/* Footer */
.site-footer {
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--line);
}

.footer-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.footer-icon-link {
  width: 2.8rem;
  height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.footer-icon-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.footer-icon-link svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin-bottom: 1.5rem;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

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

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

@media (max-width: 900px) {
  .container {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .hero-grid,
  .project-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .pub-item {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .section,
  .site-footer {
    padding: 5rem 0;
  }

  .hero {
    min-height: auto;
    padding-top: 6rem;
  }

  .hero-panel {
    justify-content: flex-start;
  }

  .hero-portrait {
    justify-content: flex-start;
  }

  #portrait-canvas {
    max-width: 260px;
  }
}