:root {
  --paper: #ffffff;
  --paper-2: #f3f6fc;
  --ink: #0d0d0d;
  --ink-soft: #33373d;
  --ink-faint: #6b7280;
  --rule: #dfe6f1;
  --accent: #2a4bd7;
  --accent-2: #1f6fb2;
  --max: 820px;

  /* type scale */
  --text-2xs: 0.72rem; /* tiny mono: nav, keywords, badges, buttons, stage, meta */
  --text-xs: 0.8rem; /* fine print: stat captions */
  --text-sm: 0.95rem; /* secondary copy: subtitles, notes, skill values */
  --text-base: 1.1875rem; /* body copy & paragraphs (19px) */
  --text-lg: 1.35rem; /* lead, hero tagline, milestone titles */
  --text-xl: 1.55rem; /* h3, feature title, stat figures */
  --text-2xl: 1.9rem; /* h2 */
  --text-3xl: 2.7rem; /* h1 */
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
nav .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
nav .brand {
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
nav .links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
nav .links a {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink-faint);
  transition: color 0.15s;
}
nav .links a:hover {
  color: var(--accent);
}
@media (max-width: 620px) {
  nav .links {
    display: none;
  }
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}
section {
  padding-top: 3.4rem;
}

.label {
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

h1 {
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: 1.08;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
h2 {
  font-weight: 600;
  font-size: var(--text-2xl);
  margin: 0 0 0.2rem;
  letter-spacing: -0.01em;
}
h3 {
  font-weight: 600;
  font-size: var(--text-lg);
  margin: 0 0 0.15rem;
}
p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}
a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent);
  transition: border-color 0.15s;
}
a:hover {
  border-color: var(--accent-2);
}

header.hero {
  padding-top: 4.2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
header.hero .hero-text {
  flex: 1;
  min-width: 0;
}
header.hero .avatar {
  flex: 0 0 auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
header.hero .sub {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  font-style: italic;
  margin: 0.2rem 0 1.4rem;
  line-height: 1.5;
}
@media (max-width: 560px) {
  header.hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1.2rem;
  }
  header.hero .avatar {
    width: 128px;
    height: 128px;
  }
}
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.6rem;
  margin-top: 0.4rem;
}
.btn,
.contact a,
.arc-links a,
.proj-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-2xs);
  padding: 0.34rem 0.72rem;
  border: 1px solid var(--rule);
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--paper-2);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn:hover,
.contact a:hover,
.arc-links a:hover,
.proj-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
}
.btn i,
.contact a i,
.arc-links a i,
.proj-links a i {
  font-size: 0.95em;
}

.entry {
  padding: 1.3rem 0;
  border-top: 1px solid var(--rule);
}
.entry:first-of-type {
  border-top: None
}
.entry.with-logo {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.entry.with-logo .edu-logo {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  margin-top: 0.2rem;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
}
.entry.with-logo .edu-body {
  flex: 1;
  min-width: 0;
}
@media (max-width: 480px) {
  .entry.with-logo .edu-logo {
    width: 42px;
    height: 42px;
  }
}
.entry .meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-2xs);
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.entry .role {
  color: var(--ink-soft);
  font-style: italic;
  font-size: var(--text-base);
  margin: 0.1rem 0 0.5rem;
}
ul.clean {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}
ul.clean li {
  color: var(--ink-soft);
  margin-bottom: 0.45rem;
}

.feature {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.3rem 1.4rem;
}
.feature .venue {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.feature .title {
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.feature .authors {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}
.badge {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.3rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0.3rem;
}
.stat {
  flex: 1;
  min-width: 150px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.8rem 0.95rem;
}
.stat .num {
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--accent-2);
  letter-spacing: -0.01em;
}
.stat .desc {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  line-height: 1.4;
}

.lead {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  margin: 0.2rem 0 1.6rem;
}
.arc {
  margin: 0 0 1.4rem;
  padding-left: 1.7rem;
  border-left: 2px solid var(--rule);
}
.milestone {
  position: relative;
  padding: 0 0 1.5rem;
}
.milestone:last-child {
  padding-bottom: 0.2rem;
}
.milestone::before {
  content: "";
  position: absolute;
  left: calc(-1.7rem - 6px);
  top: 0.4rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}
.milestone .stage {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.milestone h4 {
  margin: 0.15rem 0 0.3rem;
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--ink);
}
.milestone .submeta {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin: 0.1rem 0 0.1rem;
}
.milestone .submeta b {
  font-weight: 600;
}
.milestone p {
  margin: 0 0 0.45rem;
  font-size: var(--text-base);
}

/* highlight the thesis milestone */
.milestone.thesis::before {
  width: 14px;
  height: 14px;
  left: calc(-1.7rem - 8px);
  background: var(--accent);
}
.milestone.thesis .stage span:first-child {
  color: var(--accent);
  font-weight: 600;
}
.arc-links,
.proj-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.proj-links {
  margin-top: 0.8rem;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.45rem 0 0.7rem;
}
.keywords span {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 9%, transparent);
  border-radius: 3px;
  padding: 0.16rem 0.45rem;
}

.skillrow {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}
.skillrow .k {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  min-width: 140px;
  padding-top: 0.15rem;
}
.skillrow .v {
  flex: 1;
  min-width: 220px;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-2xs);
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.interests span {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}
.interests span:not(:last-child)::after {
  content: "·";
  color: var(--accent);
  margin-left: 0.5rem;
}
