html {
  scrollbar-gutter: stable;          /* or: stable both-edges */
}

/* Shared typography and layout */
body {
    font-family: "Georgia", sans-serif;
    margin: 6rem auto 2rem;
    max-width: 75ch;
    line-height: 1.2;
    font-size: 17px;
    color: #1a1a1a;
    background: #fdfdfd;
    padding: 0 1rem;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-ligatures: common-ligatures;
    hyphens: auto;
}

h1{
    line-height: 1.2;
    margin-top: 2rem;
    margin-bottom: 0rem;
    font-weight: 500;
    color: #020202;
}

h2{
    margin-top: 0rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #020202;
}


h3 {
    margin-top: 0rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #0a0b65;
}

h1 { font-size: 2.00rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.0rem; }

p {
    margin: 0 0 1rem 0;
}

ul, ol {
    margin: 0 0 1rem 1.25rem;
}

nav {
    margin: 1rem 0 2rem 0;
}

time {
    color: #555;
    font-size: 0.95em;
}

article {
    margin-top: 2rem;
}

/* a, a:visited, a:hover, a:active, a:focus {
    color: inherit;
}

/* Per-link themes */
/* .link--nyu { --link: #7c3aed; --hover-bg: rgba(124,58,237,.12); } 
/* .link--mcgill { --link: #dc2626; --hover-bg: rgba(220,38,38,.12); } */ 


a { text-decoration: none; border-bottom: 0px solid currentColor; }

/* 2) Base link style uses CSS vars */
a.link { 
  color: var(--link, #2563eb);
}
a.link:hover,
a.link:focus-visible {
  background: var(--hover-bg, rgba(37,99,235,.12));
  outline: none;
}

/* 3) Per-link themes (override the vars) */
a.link.link--nyu    { --link:#4911ab; --hover-bg:rgba(124,58,237,.12); } /* purple */
a.link.link--mcgill { --link:#c52424; --hover-bg:rgba(220,38,38,.12); }  /* red */

#about {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;   /* text | image */
  gap: 2rem;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;                    /* center the block */
}




/* Photo column: stack image + icons vertically */
.photo-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -50px;
  margin-right: 90px;
}

/* Image styling */
.about__photo {
  width: clamp(100px, 20vw, 200px);
  border-radius: 0px;
  object-fit: cover;
  margin-bottom: 0.5rem; /* space between photo and icons */
}
/*   position: relative;
  top: -60px; 
  left: 40px;
}
  */


.social-links {
  display: flex;
  flex-direction: row; /* stack vertically */
  align-items: center;
  gap: 0.4rem;             /* small vertical space */
  margin-top: 0.rem;      /* space between photo and links */
}

.social-links a {
  text-decoration: none;
  color: #1e40af;          /* Yale blue or your preferred tone */
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.1rem;            /* space between icon and text */
  transition: color 0.2s;
}

.social-links a {
  color: #111383;          /* default color */
  transition: color 0.2s;
}

.social-links a:hover {
  color: #111383;       /* Yale blue hover color */
}


/* --- Publications --- */
#publications h2 { margin-top: 2rem; }
#publications h3 { margin-top: 1.25rem; }

#code h2 { margin-top: 2rem; }
#code h3 { margin-top: 1.25rem; }

.pubs {
  padding-left: 1.15rem;
  margin: 0.5rem 0 1rem;
}
.pub {
  margin: 0.6rem 0;
}
.pub .authors {
  font-weight: 500;
}
.pub .title {
  font-weight: 500;
  margin-left: 0.25rem;
}
.pub .venue {
  color: #524e4e;
  margin-left: 0.1rem;
}

.pub .links a {
  text-decoration: none;
  color: #14398a;
  font-weight: 500;
  margin-right: 0.05rem;
}

.pub .links a::before {
  content: "[";
  margin-right: 0.rem;
}

.pub .links a::after {
  content: "]";
  margin-left: 0.rem;
}

.pub .links a:hover {
  background: var(--hover-bg, rgba(37, 99, 235, 0.12));
  border-radius: 4px;
}







/* Tighten up top spacing specifically */
body {
  margin-top: 0;
  padding-top: 0;
}

/* Optional: smaller top margin for the header */
header {
  margin-top: 0.5rem;     /* adjust up or down */
  padding-top: 0;
}


/* Name bar used on papers/code pages only */
.identity {
  padding: .35rem 0 .5rem;
  border-bottom: 1px solid #e5e7eb;
}
.identity .brand {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif; /* or whatever you prefer */
  font-weight: 700;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  margin: 0;
  text-align: left;     /* left aligned */
}
.identity .subtitle {
  margin: .15rem 0 0;
  line-height: 1.2;
  text-align: left;     /* left aligned */
}


.section-tabs {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 3rem;             
  margin: 1.5rem auto 0;   
  padding-bottom: 0rem;
  padding-right: 2rem;
  border-bottom: 1px solid #ddd;  
  max-width: 1000px;      
  line-height: 1.5;
}

.section-tabs a {
  /* text-decoration: underline; */
  /* text-underline-offset: 4px; */
  color: #1e40af;
  font-weight: 500;
  font-size: 1.05rem;
}

.section-tabs a:hover {
  color: #2563eb;
  text-decoration-thickness: 2px;
}

/* Name on the left */
.brand-inline {
  display: flex;
  font-weight: 500;
  font-size: 19px;
  white-space: nowrap;                 /* keep on one line */
  margin-right: auto;                /* push to left */
  line-height: 0;
}

:root { --hero-shift: 60px; }  /* tweak this value */

.hero-shift {
  transform: translateX(var(--hero-shift));
}

/* keep it nice on phones: cancel the shift when space is tight */
@media (max-width: 1100px) {
  .hero-shift { transform: none; }
}

/* =========================
   LAYOUT-ONLY OVERRIDES
   (keeps your colors/spacing/typography)
   ========================= */

/* Make the about section a solid two-column layout on wide screens:
   - Text grows freely
   - Photo column caps in size so text doesn't collapse */
#about {
  display: grid;
  gap: 2rem;
  align-items: center;
  max-width: 1100px;       /* give the whole block a comfortable max width */
  margin: -1rem auto;          /* center the block */
}

/* Remove hard/negative margins that made the photo crowd the text */
.photo-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;               /* override previous margins */
}
/* Image styling */
.about__photo {
  width: clamp(100px, 20vw, 200px);
  border-radius: 0px;
  object-fit: cover;
  margin-bottom: 0.5rem; /* space between photo and icons */
}

/* Make the image naturally fill its column and stay responsive */
.about__photo {
  width: 100%;             /* fill the image column */
  max-width: 240px;        /* but don’t get too huge */
  height: auto;            /* keep aspect ratio */
  object-fit: cover;
  border-radius: 0;
  margin-bottom: .5rem;   /* keep your spacing to icons */
}

/* Keep the social links in a tidy row next to/under the photo */
.social-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- Mobile stacking (no color/spacing changes) ---- */
@media (max-width: 900px) {
  #about {
    grid-template-columns: 1fr;   /* stack text over photo */
    gap: 1.25rem;                 /* slightly tighter gap on small screens */
    padding-inline: 0;            /* rely on your existing body padding */
  }

  .photo-column {
    align-items: flex-start;      /* align photo left under the text */
  }

  /* Keep the photo a nice size on phones */
  .about__photo {
    width: min(60vw, 300px);
    max-width: 70%;
  }
}

/* Optional: let the top nav breathe on small screens without changing colors */
@media (max-width: 900px) {
  .section-tabs {
    justify-content: center;
    gap: 1.25rem;
  }
}
