:root {
  --bg: #F5F2EC;
  --bg-card: #EFEBE2;
  --ink: #000000;
  --ink-2: #4A4740;
  --ink-3: #8A8680;
  --ink-alt: #1A1814;
  --accent: #2B4A8F;
  --accent-light: #D6E0F5;
  --rule: #D4CFCA;
  --serif: 'EB Garamond', Georgia, serif;
  --mono: 'DM Mono', monospace;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

/* -- Layout -- */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

.list {
    list-style: inside;
}

.list-element {
    margin-bottom: 0.75rem;
}

/* -- Nav -- */
nav {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-name {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

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

.nav-links a {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--ink-2);
  text-decoration: none;
  text-transform: lowercase;
  transition: color 0.2s;
}

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

/* -- Hero -- */
.hero {
  padding: 3.5rem 0 3.5rem;
  border-bottom: 1px solid var(--rule);
}

.hero-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.hero-affil {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-bio {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.hero-bio a {
  color: var(--ink);
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s, color 0.2s;
}

.hero-bio a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.hero-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-links a {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.hero-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.avatar {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-3);
  text-align: center;
}

/* -- Sections -- */
section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

h2 {
  font-size: 1.55rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

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

/* -- Tags -- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--ink-2);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 4px 10px;
}

/* -- Publications -- */
.pub-list {
  display: flex;
  flex-direction: column;
}

.pub {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0 1.25rem;
  align-items: start;
  margin-bottom: 2rem;
}

.talk {
  margin-bottom: 2rem;
}

.pub-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--ink-3);
  padding-top: 0.25rem;
  text-align: left;
}

.pub-body {}

.pub-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.2rem;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--ink-3);
  margin-bottom: 0.15rem;
  /* font-style: italic; */
}

.pub-venue {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin-bottom: 0.35rem;
}

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

.pub-links a {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-light);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}

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

.pub-abstract {
  display: none;
  margin-top: 0.5em;
  padding: 0em 1em;
  border-left: 3px solid #aaa;
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.pub-abstract.open {
  display: block;
}

.pub-note {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--ink-3);
}

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

/* -- Projects -- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  border: 1px solid var(--rule);
  background: var(--rule);
}

.proj-card {
  background: var(--bg);
  padding: 1.5rem;
}

.proj-name {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.proj-name a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.proj-name a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.proj-desc {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

/* ── Education ── */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.edu-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.edu-item:first-child { margin-top: -1rem; }
.edu-item:last-child { border-bottom: none; }

.edu-year {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--ink-3);
  padding-top: 0.25rem;
}

.edu-degree {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.edu-school {
  font-size: 0.9rem;
  color: var(--ink-2);
  font-style: italic;
  margin-bottom: 0.35rem;
}

.edu-note {
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* -- Footer -- */
footer {
  padding: 2rem 0;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--ink-3);
}

/* -- Animations -- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-top, .hero-bottom { animation: fadeUp 0.6s ease both; }
section { animation: fadeUp 0.5s ease both; }
section:nth-of-type(2) { animation-delay: 0.05s; }
section:nth-of-type(3) { animation-delay: 0.1s; }
section:nth-of-type(4) { animation-delay: 0.15s; }
section:nth-of-type(5) { animation-delay: 0.2s; }

/* -- Responsive -- */
@media (max-width: 620px) {
  .nav-links { gap: 1rem; }
  .pub { grid-template-columns: 1fr; }
  .pub-num { display: none; }
  .edu-item { grid-template-columns: 1fr; gap: 4px; }
  .edu-year { padding-top: 0; }
}

/* -- Hide third image first -- */
@media (max-width: 900px) {
    #avatar-3 {
        display: none;
    }
}

@media (max-width: 750px) {
    #avatar-2 {
        display: none;
    }
}

@media (max-width: 650px) {
    #avatar-1 {
        display: none;
    }
}
