@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=VT323&display=swap');

@font-face {
  font-family: 'RedAlert';
  src: url('fonts/CnC-Red-Alert.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #080e1f;
  --text: #e8eeff;
  --muted: #7a90b8;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-light: rgba(16, 185, 129, 0.15);
  --nav-bg: #050b16;
  --nav-text: #e8eeff;
  --border: #10b981;
  --border-light: rgba(255, 255, 255, 0.08);
  --surface: #0d1428;
  --pixel-shadow: 4px 4px 0 0 var(--accent);
  --pixel-shadow-accent: 4px 4px 0 0 var(--accent);
  --font-pixel: 'VT323', monospace;
  --font-pixel-sm: 'VT323', monospace;
  --font-body: 'VT323', monospace;
  --font-read: 'Space Grotesk', sans-serif;
  --max-w: 1040px;
  --nav-h: 68px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text);
  line-height: 1.5;
  font-size: 1rem;
  letter-spacing: 0.02em;
  font-synthesis: none;
}

/* ── NAV ─────────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  background: var(--nav-bg);
  z-index: 100;
  border-bottom: 3px solid var(--accent);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  letter-spacing: 0;
  flex-shrink: 0;
  margin-right: auto;
  line-height: 1.6;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.1rem;
}

.nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  font-family: var(--font-pixel-sm);
  font-size: 1.25rem;
  font-weight: 400;
  padding: 0.4rem 0.7rem;
  opacity: 0.6;
  transition: opacity 0.1s, background 0.1s;
  display: block;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  background: rgba(5, 150, 105, 0.15);
  color: var(--accent);
}

.nav-collapsible {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.nav-social {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}

.nav-social a {
  color: var(--nav-text);
  opacity: 0.5;
  transition: opacity 0.1s, background 0.1s;
  display: flex;
  align-items: center;
  padding: 0.4rem;
}

.nav-social a:hover {
  opacity: 1;
  background: rgba(5, 150, 105, 0.15);
  color: var(--accent);
}

.nav-social svg { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--nav-text);
}

/* ── MAIN ─────────────────────────────────────────── */

main {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 6rem;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── TYPOGRAPHY ───────────────────────────────────── */

h1 {
  font-family: var(--font-pixel);
  font-size: clamp(3.25rem, 7vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
  color: var(--text);
}

h2 {
  font-family: var(--font-pixel-sm);
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text);
}

h3 {
  font-family: var(--font-pixel-sm);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  font-family: var(--font-read);
  font-size: 1.08rem;
  line-height: 1.7;
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.label {
  display: block;
  font-family: var(--font-pixel-sm);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

section { margin-bottom: 4rem; }

section > h2 { margin-bottom: 1.25rem; }

/* ── PAGE HEADER ──────────────────────────────────── */

.page-header {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 2px solid var(--text);
}

.page-header h1 { margin-bottom: 1rem; }

.page-header p {
  color: var(--muted);
  max-width: 720px;
}

/* ── ABOUT / HERO ─────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 3rem;
  align-items: start;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 2px solid var(--text);
}

.hero h1 { margin-bottom: 0.75rem; }

.hero-role {
  font-family: var(--font-pixel-sm);
  font-size: 1.4rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.hero-bio { max-width: 640px; }

.hero-photo {
  width: 215px;
  height: 215px;
  flex-shrink: 0;
  background: var(--surface);
  border: 2px solid var(--text);
  box-shadow: var(--pixel-shadow);
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tag {
  font-family: var(--font-pixel-sm);
  font-size: 1.2rem;
  font-weight: 400;
  background: var(--accent-light);
  color: var(--text);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--accent);
  letter-spacing: 0.02em;
}

/* ── CARDS ────────────────────────────────────────── */

.card-grid { display: grid; gap: 1.25rem; }

.card {
  border: 2px solid var(--text);
  padding: 1.5rem;
  box-shadow: var(--pixel-shadow);
  background: var(--bg);
  transition: transform 0.1s, box-shadow 0.1s;
}

.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--accent);
  border-color: var(--accent);
}

.card-tag {
  font-family: var(--font-pixel-sm);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  display: block;
  opacity: 0.9;
}

.card h3 { margin-bottom: 0.5rem; }

.card p {
  color: var(--muted);
  margin-bottom: 0;
}

.photo-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.photo-row img {
  flex: 9 1 0;            /* portrait side photos (3:4) */
  min-width: 0;
  height: auto;
  display: block;
  border: 2px solid var(--text);
  box-shadow: var(--pixel-shadow);
}
.photo-row img:nth-child(2) {
  flex: 16 1 0;           /* landscape middle photo (4:3) */
}

.research-figure {
  margin: 1.5rem 0 0;
}
.research-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--text);
  box-shadow: var(--pixel-shadow);
}
.research-figure figcaption {
  font-family: var(--font-read);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.85rem;
  line-height: 1.5;
}

/* ── PUBLICATIONS ─────────────────────────────────── */

.pub-list { list-style: none; }

.pub-item {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border-light);
}

.pub-item:first-child { border-top: 1px solid var(--border-light); }

.pub-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.badge {
  font-family: var(--font-pixel-sm);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
}

.badge-year {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border-light);
}

.badge-type {
  background: var(--accent-light);
  color: var(--text);
  border: 1px solid var(--accent);
}

.pub-title {
  font-family: var(--font-pixel-sm);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

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

.pub-venue {
  font-family: var(--font-read);
  font-size: 0.95rem;
  color: var(--text);
  font-style: italic;
}

.venue-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.venue-list li {
  font-family: var(--font-read);
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.3rem;
  padding-left: 1.35rem;
  position: relative;
}
.venue-list li:last-child { margin-bottom: 0; }
.venue-list li::before {
  content: "\25B8";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* cheeky "publications in progress" callout */
.pub-progress {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--pixel-shadow);
  padding: 1.5rem 1.75rem;
}

.pub-progress-cursor {
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1.2;
  animation: cursor-blink 1.1s step-end infinite;
}

.pub-progress-title {
  font-family: var(--font-pixel-sm);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text);
  margin: 0 0 0.5rem 0;
}

.pub-progress-dots {
  color: var(--accent);
  animation: cursor-blink 1.1s step-end infinite;
}

.pub-progress-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.pub-footnote {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--muted);
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── CV ───────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-pixel-sm);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  letter-spacing: 0.04em;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn:hover { text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent-hover);
  box-shadow: 3px 3px 0 0 var(--accent-hover);
}

.btn-primary:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--accent-hover);
  color: white;
}

.cv-section { margin-bottom: 3rem; }

.cv-section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cv-section-heading h2 { margin: 0; flex-shrink: 0; }

.cv-rule {
  flex: 1;
  height: 2px;
  background: var(--text);
}

.cv-entry {
  display: grid;
  grid-template-columns: 205px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.cv-entry:last-child { border-bottom: none; }

.cv-date {
  font-family: var(--font-pixel-sm);
  font-size: 1.3rem;
  color: var(--muted);
  font-weight: 400;
  padding-top: 0.15rem;
  line-height: 1.6;
  white-space: nowrap;
}

.cv-body h3 { margin-bottom: 0.15rem; }
.cv-body .cv-org { color: var(--muted); font-size: 0.9rem; margin-bottom: 0; }
.cv-body .cv-desc { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; margin-bottom: 0; }

.cv-bullets {
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
}
.cv-bullets li {
  font-family: var(--font-read);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 0.4rem;
  padding-left: 1.35rem;
  position: relative;
}
.cv-bullets li:last-child { margin-bottom: 0; }
.cv-bullets li::before {
  content: "\25B8";           /* ▸ pixel-ish arrow */
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── OUTREACH ─────────────────────────────────────── */

.outreach-grid { display: grid; gap: 0.875rem; }

.outreach-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 0 var(--border-light);
  align-items: flex-start;
  transition: transform 0.1s, box-shadow 0.1s;
}

.outreach-item:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--accent);
  border-color: var(--accent);
}

.outreach-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.outreach-icon svg { width: 20px; height: 20px; }

.outreach-text h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.outreach-text p { font-size: 1rem; color: var(--muted); margin: 0; }

/* ── NEWS LIST ────────────────────────────────────── */

.news-list {
  list-style: none;
  display: grid;
  gap: 0.875rem;
}

.news-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  font-size: 1rem;
  padding: 0.875rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}

.news-date {
  font-family: var(--font-pixel-sm);
  font-size: 1.4rem;
  color: var(--muted);
  font-weight: 700;
  padding-top: 0.2rem;
  line-height: 1.6;
}

/* news descriptions read as prose */
.news-item span:not(.news-date) {
  font-family: var(--font-read);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── LINKS SECTION ────────────────────────────────── */

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── HOME PAGE — PIXEL-ART DESK SCENE ─────────────── */

.scene-main {
  height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #14262d;          /* matches the GIF's wall color to fill letterbox */
  padding: 0;
}

.scene {
  position: relative;
  aspect-ratio: 4 / 3;
  height: 100%;
  max-width: 100%;
}

.scene img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;   /* keep pixels crisp when scaled up */
  image-rendering: crisp-edges;
}

/* ── FOOTER ───────────────────────────────────────── */

footer {
  border-top: 2px solid var(--text);
  padding: 2rem;
  text-align: center;
  font-family: var(--font-pixel-sm);
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg);
  letter-spacing: 0.04em;
}

/* ── RESPONSIVE ───────────────────────────────────── */

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links, .nav-sep, .nav-social { display: none; }

  .nav-collapsible {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--nav-bg);
    padding: 1.25rem 2rem 1.5rem;
    flex-direction: column;
    gap: 1.25rem;
    border-top: 2px solid var(--accent);
    border-bottom: 3px solid var(--accent);
  }

  .nav.open .nav-collapsible { display: flex; }
  .nav.open .nav-links,
  .nav.open .nav-social { display: flex; }

  .nav-links { flex-direction: column; }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-photo {
    width: 150px;
    height: 150px;
  }

  h1 { font-size: 2.6rem; }

  .cv-entry {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .cv-date { color: var(--accent); }

  .news-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
