/* ─────────────────────────────────────────────
   Reset & base
   ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #1c1917;
  background: #fafaf9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

/* ─────────────────────────────────────────────
   Typography
   ───────────────────────────────────────────── */
.serif,
.name,
.section-title,
.paper-title {
  font-family: 'Cormorant Garamond', 'Hoefler Text', Georgia, serif;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.name {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 500;
  margin: 0 0 0.25rem;
  letter-spacing: -0.015em;
}

.tagline {
  color: #78716c;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}

p {
  margin: 0 0 1rem;
}

strong {
  font-weight: 600;
  color: #1c1917;
}

a {
  color: #1c1917;
  text-decoration: underline;
  text-decoration-color: #d6d3d1;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: #b45309;
  text-decoration-color: currentColor;
}

::selection {
  background: #fef3c7;
  color: #1c1917;
}

/* ─────────────────────────────────────────────
   Layout
   ───────────────────────────────────────────── */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

@media (min-width: 640px) {
  .container {
    padding: 5rem 2rem 6rem;
  }
}

/* ─────────────────────────────────────────────
   Hero
   ───────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
  margin-bottom: 4rem;
}

@media (min-width: 640px) {
  .hero {
    grid-template-columns: 1fr 200px;
    gap: 2.5rem;
    align-items: center;
  }
}

.hero-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  justify-self: center;
  box-shadow: 0 12px 30px -12px rgba(28, 25, 23, 0.25);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  order: -1;
}

@media (min-width: 640px) {
  .hero-photo {
    width: 200px;
    height: 200px;
    order: 0;
  }
}

.hero-photo:hover {
  transform: scale(1.04);
}

.hero-text p {
  color: #44403c;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #57534e;
  background: #ffffff;
  border: 1px solid #e7e5e4;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.social-links a:hover {
  color: #b45309;
  background: #fffbeb;
  border-color: #fcd34d;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -10px rgba(180, 83, 9, 0.35);
}

.social-links a:focus-visible {
  outline: 2px solid #b45309;
  outline-offset: 2px;
}

.social-links svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.social-links a {
  flex-shrink: 0;
}

/* Safari: an <a> wrapping the hero photo is inline by default and
   doesn't reliably honor the photo's box in grid. Make it a block
   sized to the image. */
.hero > a {
  display: block;
  width: 150px;
  height: 150px;
  justify-self: center;
  border-radius: 50%;
  overflow: hidden;
}

@media (min-width: 640px) {
  .hero > a {
    width: 200px;
    height: 200px;
  }
}

/* ─────────────────────────────────────────────
   Sections
   ───────────────────────────────────────────── */
.section {
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 500;
  margin: 0 0 0.75rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: #b45309;
  margin-top: 0.5rem;
  border-radius: 2px;
}

.section-intro {
  color: #44403c;
  margin-bottom: 2.25rem;
  max-width: 60ch;
}

/* ─────────────────────────────────────────────
   Papers
   ───────────────────────────────────────────── */
.papers {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.paper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e7e5e4;
}

.paper:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

@media (min-width: 640px) {
  .paper {
    grid-template-columns: 200px 1fr;
    gap: 1.75rem;
    align-items: start;
  }
}

.paper-thumb {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  justify-self: center;
}

@media (min-width: 640px) {
  .paper-thumb {
    width: 200px;
    max-width: 200px;
    align-self: start;
  }
}

.paper-title {
  font-size: clamp(1.2rem, 2.2vw, 1.35rem);
  font-weight: 600;
  margin: 0 0 0.6rem;
  line-height: 1.25;
}

.paper-title a {
  text-decoration: none;
  color: #1c1917;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.2s ease;
}

.paper-title a:hover {
  color: #b45309;
  background-size: 100% 1px;
}

.paper-authors {
  font-size: 0.85rem;
  color: #57534e;
  margin: 0 0 0.35rem;
  line-height: 1.6;
}

.paper-authors a {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.paper-authors a:hover {
  color: #b45309;
  border-bottom-color: currentColor;
}

.paper-authors .self {
  color: #1c1917;
  font-weight: 600;
  border-bottom: 1px solid #d6d3d1;
}

.paper-affil {
  font-size: 0.78rem;
  color: #78716c;
  margin: 0 0 0.75rem;
  font-style: italic;
}

.paper-venue {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
  background: #fef3c7;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.85rem;
}

.paper-desc {
  font-size: 0.92rem;
  color: #44403c;
  margin: 0;
  line-height: 1.65;
}

.paper-desc a {
  color: #b45309;
  text-decoration-color: #fcd34d;
}

.paper-desc a:hover {
  text-decoration-color: currentColor;
}

/* ─────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────── */
.footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e7e5e4;
  font-size: 0.78rem;
  color: #78716c;
  text-align: center;
}

.footer a {
  color: #57534e;
}

@media (min-width: 640px) {
  .footer {
    text-align: right;
  }
}

/* ─────────────────────────────────────────────
   Desktop scale-up
   Larger text + roomier layout on wide screens.
   Bumping the root font-size scales every rem-based
   size proportionally; mobile/tablet stay untouched.
   ───────────────────────────────────────────── */
@media (min-width: 1024px) {
  html {
    font-size: 18px;
  }

  .container {
    max-width: 1000px;
  }

  .paper {
    grid-template-columns: 260px 1fr;
  }

  .paper-thumb {
    width: 260px;
    max-width: 260px;
  }
}

@media (min-width: 1440px) {
  html {
    font-size: 19px;
  }

  .container {
    max-width: 1140px;
  }

  .paper {
    grid-template-columns: 300px 1fr;
  }

  .paper-thumb {
    width: 300px;
    max-width: 300px;
  }
}

/* ─────────────────────────────────────────────
   Reduced motion
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
