
/* ==========================
   Variables
   ========================== */
:root{
   --bg: #fafaf7;
   --text: #222;
   --muted: #555;
   --accent: #2b6cb0;
   --border: #e8e5e0;
   --max-width: 780px;
   --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
   --font-heading: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}


/* ==========================
   Typography system
   - fonts loaded via Google Fonts (Inter + Instrument Serif)
   ========================== */
h1, h2, h3, h4, h5, h6 {
   font-family: var(--font-heading);
   letter-spacing: -0.02em;
   font-weight: 400;
   color: var(--text);
}


/* ==========================
   Base / Reset
   ========================== */
*, *::before, *::after { box-sizing: border-box }
html, body { height: 100% }
body{
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

table, td, th, tr,
p,
a,
li,
ol,
ul {
   font-family: var(--font-body);
   font-size: 15px;
   line-height: 1.75;
   letter-spacing: -0.011em;
   color: var(--text);
}

/* ==========================
   Layout wrappers
   ========================== */
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px }


.top { padding: 56px 0 16px }
.top > .wrap:last-child { border-bottom: none; padding-bottom: 0 }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px }
.header-text { flex: 1; min-width: 0 }
.header-about { margin-top: 16px }
.header-about p { color: #333 }
.top h1 { margin: 0; font-weight: 400; font-size: 36px } /* name */
.tag { margin: 8px 0 0; color: var(--muted); font-size: 15px; font-weight: 300 }
.photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); margin-top: 6px; }


/* ==========================
   Typography
   ========================== */
.main { padding-top: 0; padding-bottom: 48px }
.main h2 { margin-top: 36px; margin-bottom: 12px; font-size: 26px; padding-bottom: 8px; border-bottom: 1.5px solid var(--border) }
.main section:first-child h2 { margin-top: 8px }
section p { margin: 0 0 14px; color: #333 }
ol { margin: 8px 0 12px; padding-left: 20px }
.small { color: var(--muted); font-size: 12px }

.paper-title { font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 5px; line-height: 1.4 }
.authors { color: var(--muted); font-size: 13.5px; margin-bottom: 5px; line-height: 1.5 }
.authors strong, .authors a { font-size: inherit }
.venue { color: #444; font-size: 13.5px; margin-bottom: 4px; font-weight: 600; letter-spacing: 0.01em }
.links { color: var(--muted); font-size: 13px; margin-bottom: 4px }
.paper-abstract { margin-top: 6px; color: var(--muted); font-size: 13px; font-style: italic; line-height: 1.55 }


/* ==========================
   Links & small interactions
   ========================== */
a { color: #2b6cb0; text-decoration: none; transition: color .15s ease }
a:hover { text-decoration: none; color: #1a5294 }

/* Mobile nav toggle (if present) is handled by script.js; keep link behavior consistent */


/* ==========================
   Publications table / thumbnails
   ========================== */
.pub-table { margin-top: 16px; border-spacing: 0 }
.pub-table tr { transition: background .15s ease }
/* Hover effect for publication rows */
.pub-table tr:hover { background: rgba(26, 78, 207, 0.03) } 
.pub-table td { vertical-align: top }
.one { position: relative }
.one img { display: block; border-radius: 8px }
.two { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .18s ease-in-out }
.two video { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block }

/* Publication column sizing: semantic classes for left (thumbnail) and right (meta) */
.pub-left {
   width: 25%;
   max-width: 180px; /* keeps thumbnail reasonably constrained on wide screens */
   vertical-align: middle;
   padding: 0; /* individual td keeps padding via inline style */
}
.pub-left .one { max-width: 180px }
.pub-left .one img,
.pub-left .one video { width: 100%; height: auto; display: block; border-radius: 8px }
.pub-right { width: 75%; vertical-align: middle; padding-left: 16px }

/* Responsive: stack columns on narrower viewports */
@media (max-width: 720px) {
   /* .pub-left, .pub-right { width: 100% !important; max-width: none; display: block } */
   .pub-table td { display: block; width: 100% }
   .pub-left .one { margin-bottom: 10px }
}

/* No-underline hover for titles/authors: subtle background highlight */
.paper-link .paper-title,
.authors a {
  color: var(--accent);
  text-decoration: none; /* ensure no underline */
  transition: color .15s ease, background-color .15s ease, transform .15s ease;
  display: inline-block;
  padding: 0 1px; /* tiny padding so background highlight has room */
  border-radius: 3px;
}

.paper-link:hover .paper-title,
.authors a:hover {
  color: #0d3299;
  background-color: rgba(26,78,207,0.06);
  transform: translateY(-0.5px);
}


/* ==========================
   Footer
   ========================== */
.footer { border-top: 1px solid var(--border); padding: 24px 0 40px; margin-top: 0; text-align: center; color: var(--muted); font-size: 13px }


/* ==========================
   Utilities
   ========================== */
.fade { transition: opacity .2s ease-in-out; -moz-transition: opacity .2s ease-in-out; -webkit-transition: opacity .2s ease-in-out; }
span.highlight { background-color: #ffffd0 }
.colored-box { color: black; padding: 20px; display: inline-block; border-radius: 10px }


/* ==========================
   Responsive
   ========================== */
@media (max-width: 520px) {
  /* Hide video overlays on small screens to avoid autoplay surprises */
  .two { display: none }
  .pub-table td { display: block; width: 100% }
  .pub-table td:first-child { margin-bottom: 10px }

  .header-row { flex-direction: column; align-items: flex-start }
  /* slightly smaller rectangular image on narrow screens */
  .photo { width: 120px; height: 90px; margin-top: 12px; border-radius: 6px }
}

@media print {
  .top, .footer { display: none }
  .wrap { max-width: 100%; padding: 0 }
}

