:root{
  --font:
    'Roboto',
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    "Liberation Sans",
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji";
}

/* Base */
body{
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5;
  text-align: left;
  background-color: #fff;
  margin: 0;
  color: #111827;
}

td, th, tr, p, a{
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:focus,
a:hover {
  color: #0f5bb5;
  text-decoration: underline;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.z-depth-1 {
    -webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
    box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
}

.rounded {
    border-radius: .25rem!important;
}

strong {
  font-family: 'Roboto',--apple-system,'Segoe UI',sans-serif;
  /* font-size: 14px; */
  font-weight: 500;
}

h2 {
  margin: 0;
  font-weight: 500;
  font-size: 1.375rem; /* 22px */
  letter-spacing: -0.2px;
}

.papertitle {
  font-weight: 500;
}

span.highlight {
  background-color: #ffffd0;
}

.colored-box {
    color: black;
    padding: 20px;
    display: inline-block;
    border-radius: 10px;
}

.paper-desc {
  font-size: .95rem;
  margin: 6px 0 0 0;
  color: #374151;
}

/* ===== Layout wrapper ===== */
.page{
  width: 100%;
  max-width: 900px;     /* adjust to taste */
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Top section (desktop) ===== */
.top{
  display: grid;
  grid-template-columns: 1fr 260px;   /* keeps your current photo column size */
  grid-template-areas:
    "left right"
    "bio  right";
  column-gap: 28px;
  row-gap: 0px;
  align-items: start;
  padding-top: 30px;                 /* keep exactly what you already had */
}

.top-left{ grid-area: left; min-width: 0; }
.top-right{ 
  grid-area: right; 
  padding-top: 50px;
}
.top-bio{ grid-area: bio; }

/* Photo (same look as before) */
.profile-img{
  /* margin-top: 10px; */
  width: 100%;
  height: auto;
  object-fit: cover;
}

.profile-meta{
  /* margin-top: 10px; */
  font-size: 0.95rem;
  color: #374151;
  text-align: left;
}

.profile-email i{ margin-right: .35rem; }
.profile-email a{ color: inherit; }

/* ===== Name styling ===== */
.name{
  margin: 0 0 10px 0;
  /* padding-top: 20px; */
  font-size: clamp(2rem, 4vw, 2.125rem);
  font-weight: 300;   /* or 400 if you want lighter */
  line-height: 1.1;
  padding-bottom: 0px;
  margin-bottom: 0px;
}
.name-first{ font-weight: 500; }

.bio{ max-width: 65ch; }

/* ===== Icon links (bottom like screenshot) ===== */
.links{
  display: flex;
  justify-content: left;
  gap: 7px;
  /* margin-top: 26px; */
  /* margin-bottom: 10px; */
}

.links a{
  font-size: 2rem;
  line-height: 1.25;
  color: #111827;
}

.links a:hover{ color: #1772d0; }

/* Show bottom icons on desktop, hide top icons */
.links-desktop{ display: flex; }
.links-mobile{ display: none; justify-content: flex-start; margin: 10px 0 14px 0; }

/* ===== Mobile order: Name → Email → Icons → Picture → Bio ===== */
@media (max-width: 700px){
  .top{
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "right"
      "bio";
    row-gap: 12px;
  }

  .top-right{
    width: 100%;
    padding-top: 14px;   /* space between icons and photo */
  }

  /* keep your icon sizing tweaks on mobile (from your current CSS) */
  .links{
    gap: 10px;
  }
  .links a{
    font-size: 1.6rem;
  }
}

/* Prevent overflow and force wrapping */
*{
  box-sizing: border-box;
}

html, body{
  width: 100%;
  overflow-x: hidden;
}

img{
  max-width: 100%;
  height: auto;
}

/* Long links/words should wrap instead of overflowing */
p, a, td, div{
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 700px){
  /* Make publication rows stack nicely */
  table{
    width: 100% !important;
  }

  /* For your publications table rows: image on top, text below */
  table tr{
    display: block;
  }
  table td{
    display: block;
    width: 100% !important;
    padding: 10px 16px !important;
  }

  /* Reduce extra spacing from inline styles if needed */
  h2{
    padding: 0 16px !important;
  }
}

.email-line{
  font-size: 0.95rem;
  color: #007bff;
}


.paper-buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* Base button */
.btn{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 2px 6px;
  font-size: 0.85rem;
  font-weight: 400;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color .18s ease,
              color .18s ease,
              border-color .18s ease;
  cursor: pointer;
}

/* Transparent outline style */
.btn-outline{
  color: #1772d0;
  background-color: transparent;
  border: 1px solid rgba(23, 114, 208, 0.35);
}

/* Hover effect (opaque fill) */
.btn-outline:hover{
  background-color: #1772d0;
  color: #ffffff;
  border-color: #1772d0;
}

/* Icon alignment */
.btn i{
  font-size: 0.85em;
}

hr {
  border: none;
  border-top: 1px solid #e5e7eb; /* very light gray */
  margin: 2rem 0;
}

html, body {
  height: 100%;
  margin: 0;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1; /* pushes footer to bottom */
}

.site-footer {
  margin-top: 2rem;
}
