@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ─── Reset & tokens ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:        #1a3a52;
  --accent-light:  #2a5f84;
  --bg:            #ffffff;
  --bg-alt:        #f4f6f9;
  --text:          #1a1a1a;
  --text-muted:    #556370;
  --border:        #dde2e8;
  --shadow:        0 2px 14px rgba(0,0,0,0.07);
  --radius:        8px;
  --header-h:      58px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 5vw;
  background: rgba(255,255,255,0);
  transition: background 0.3s, box-shadow 0.3s;
  z-index: 100;
}

.site-name {
  flex: 1;
  font-size: 0.92em;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent);
  text-decoration: none;
}

#site-header nav {
  display: flex;
  gap: 2.2rem;
}

#site-header nav a {
  font-size: 0.78em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}

#site-header nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s;
}

#site-header nav a:hover { color: var(--accent); }
#site-header nav a:hover::after { width: 100%; }

/* ─── Section base ───────────────────────────────────────────────────────── */
.full-section {
  padding: 80px 8vw 64px;
}

.full-section:nth-child(odd)  { background: var(--bg); }
.full-section:nth-child(even) { background: var(--bg-alt); }

.full-section > h2 {
  font-size: 1.45em;
  font-weight: 300;
  color: var(--accent);
  margin-bottom: 2.2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
#presentation {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-h) + 2rem);
  background: var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  max-width: 880px;
  margin: 0 auto;
  align-items: start;
  padding: 0 2vw;
}

/* Left column */
.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  padding-top: 0.4rem;
}

.profile-photo {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  background: var(--bg-alt);
  flex-shrink: 0;
}

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

.hero-social {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.hero-social a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8em;
  transition: color 0.2s;
  white-space: nowrap;
}

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

.hero-social svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.hero-social a:hover svg { opacity: 1; }

/* Right column */
.hero-right h1 {
  font-size: 2.1em;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.affiliation {
  font-size: 0.92em;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  font-weight: 400;
}

.bio {
  font-size: 1em;
  line-height: 1.75;
  color: #444;
  max-width: 58ch;
}

/* Scroll cue */
.call_to_action {
  text-align: center;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
}

.call_to_action a {
  display: inline-block;
  color: var(--accent);
  opacity: 0.6;
  text-decoration: none;
  animation: bounce 2.2s ease-in-out infinite;
  transition: opacity 0.2s;
}

.call_to_action a:hover { opacity: 1; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* Mobile hero */
@media (max-width: 680px) {
  .call_to_action { display: none; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    text-align: center;
  }
  .hero-left { align-items: center; }
  .hero-right h1 { font-size: 1.7em; }
  .bio { max-width: 100%; }

  .hero-social {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
  }
  .hero-social a {
    padding: 7px;
  }
  .hero-social a span { display: none; }
  .hero-social svg { width: 20px; height: 20px; opacity: 0.7; }
}

/* ─── Publications ───────────────────────────────────────────────────────── */
#publications ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

#publications ul > li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 1fr auto;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* Venue badge */
.venue-badge {
  position: absolute;
  top: 0; left: 0;
  padding: 3px 11px;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.venue-badge.conference { background: var(--accent); }
.venue-badge.preprint   { background: #6b7280; }

/* Paper image */
.pub-image {
  position: relative;
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.8rem 1.2rem 2rem;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
}

.pub-image img,
.pub-image object {
  max-width: 100%;
  max-height: 230px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Paper content */
.pub-content {
  grid-column: 2;
  grid-row: 1;
  padding: 1.6rem 1.6rem 0.6rem;
}

.pub-content h3 {
  font-size: 1.05em;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.45rem;
}

.pub-content h3 a {
  text-decoration: none;
  color: var(--accent);
  transition: color 0.2s;
}

.pub-content h3 a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.authors {
  font-size: 0.85em;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.9rem;
}

.paper-body { font-size: 0.88em; color: #555; line-height: 1.65; }

.tldr, .abstract { display: block; margin-bottom: 0.35rem; }

.tldr::before     { content: "TL;DR\00a0— "; font-weight: 600; color: var(--text); }
.abstract::before { content: "Abstract\00a0— "; font-weight: 600; color: var(--text); }

.read-more-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  cursor: pointer;
  font-size: 0.85em;
  font-family: inherit;
  padding: 0;
  vertical-align: baseline;
}
.read-more-btn:hover { text-decoration: underline; }

/* Paper links */
.pub-links {
  grid-column: 2;
  grid-row: 2;
  padding: 0.6rem 1.6rem 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-self: end;
}

.pub-links a {
  font-size: 0.75em;
  font-weight: 600;
  padding: 4px 13px;
  border-radius: 5px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.02em;
}

.pub-links a:hover { background: var(--accent); color: #fff; }

.pub-links a.demo {
  border-color: #7c3aed;
  color: #7c3aed;
  background: #f6f0ff;
}
.pub-links a.demo:hover { background: #7c3aed; color: #fff; }

/* Mobile publications */
@media (max-width: 800px) {
  #publications ul > li {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .pub-image {
    grid-column: 1; grid-row: 1;
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: 200px;
    overflow: hidden;
    padding: 1.8rem 1.2rem 1.2rem;
  }

  .pub-image img,
  .pub-image object {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
  }
  .pub-content { grid-column: 1; grid-row: 2; }
  .pub-links   { grid-column: 1; grid-row: 3; }
}

/* ─── Curriculum Vitae ───────────────────────────────────────────────────── */
.cv-sections {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.cv-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 2rem;
  box-shadow: var(--shadow);
}

.cv-section > h3 {
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.cv-section > ul { list-style: none; }

.cv-section > ul > li { margin-bottom: 1.3rem; }
.cv-section > ul > li:last-child { margin-bottom: 0; }

.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.15rem;
}

.cv-entry-header h4 {
  font-size: 0.97em;
  font-weight: 500;
  color: var(--text);
}

.cv-date {
  font-size: 0.8em;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.cv-entry-sub {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.cv-description {
  list-style: none;
  margin-top: 0.35rem;
}

.cv-description li {
  font-size: 0.85em;
  color: var(--text-muted);
  padding-left: 1.1em;
  position: relative;
  margin-bottom: 0.22rem;
  line-height: 1.55;
}

.cv-description li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.45;
}

/* Key-value list (skills, languages) */
.cv-kv-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cv-kv-list li {
  font-size: 0.88em;
  color: var(--text-muted);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cv-kv-list li strong {
  color: var(--text);
  min-width: 155px;
  flex-shrink: 0;
}

@media (max-width: 800px) {
  .cv-section { padding: 1.2rem 1.2rem; }
  .cv-kv-list li strong { min-width: 120px; }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: #12293d;
  padding: 1.1rem 5vw;
  text-align: center;
  font-size: 0.75em;
  color: rgba(255,255,255,0.3);
}

/* ─── Mobile global ──────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .full-section { padding: 60px 5vw 44px; }
  #site-header nav { gap: 1.4rem; }
}
