/* === TOM TEMPLATE === */

/* === GLOBAL RESET / BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: #f9fafb; /* gray-50 */
  color: #111827;            /* gray-900 */
}

/* Wrapper to center content */
.page-wrapper {
  min-height: 100vh;
}

/* Utility container mimicking max-w-4xl mx-auto */
.max-w-4xl {
  max-width: 56rem; /* ~4xl */
  margin-left: auto;
  margin-right: auto;
}

/* Spacing utilities (Tailwind-like) */
.mt-12 { margin-top: 3rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mt-0_5 { margin-top: 0.125rem; }  /* custom helper if needed */

.py-8  { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.p-2   { padding: 0.5rem; }
.p-4   { padding: 1rem; }
.p-6   { padding: 1.5rem; }

.px-2  { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2_5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-2_5 { padding-left: 0.625rem; padding-right: 0.625rem; }

.py-0_5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }

/* Basic flex utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }

.justify-between { justify-content: space-between; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }

.flex-wrap { flex-wrap: wrap; }

/* Gap approximation */
.gap-4 { gap: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-1 { gap: 0.25rem; }

/* Borders / radius / shadows */
.border {
  border-width: 1px;
  border-style: solid;
  border-color: #e5e7eb; /* gray-200 */
}

.border-gray-200 { border-color: #e5e7eb; }
.border-yellow-200 { border-color: #facc15; }
.border-blue-200 { border-color: #bfdbfe; }
.border-gray-300 { border-color: #d1d5db; }
.rounded-lg { border-radius: 0.75rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-full { border-radius: 9999px; }

.shadow-md {
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Background colors */
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }

.bg-yellow-100 { background-color: #fef9c3; }
.bg-blue-100   { background-color: #dbeafe; }
.bg-green-100  { background-color: #dcfce7; }

.bg-gray-200 { background-color: #e5e7eb; }

/* Text alignment, fonts, and sizes */
.text-center { text-align: center; }

.text-gray-900 { color: #111827; }
.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4b5563; }

.text-yellow-800 { color: #854d0e; }
.text-blue-800   { color: #1d4ed8; }
.text-green-800  { color: #166534; }

.text-xs { font-size: 0.70rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-md { font-size: 0.875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

/* Headers */
h1, h2, h3 {
  margin: 0;
}

h2.section-title {
  font-size: 1.6rem;      /* text-2xl */
  font-weight: 700;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h3.paper-title,
h3.course-title,
h3.wip-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

/* Font weights */
.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }

/* Leading utilities */
.leading-tight { line-height: 1.1; }

/* Margins */
.mb-4 { margin-bottom: 1rem; }
.mb-10 { margin-bottom: 2.5rem; }

/* Links */
a {
  color: #4f46e5; /* indigo-600 */
  text-decoration: none;
}

a:hover {
  color: #4338ca; /* indigo-700 */
}

a:visited {
  color: #6d28d9; /* purple-700 */
}

.paper-link {
  text-decoration: none;
}

/* Main layout */
main {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Hero section title */
.hero-title {
  text-align: center;
  margin-top: 3rem;
  margin-bottom: 2.5rem;
  font-size: 4rem;     /* equivalent to text-5xl */
  font-weight: 800;
  color: #111827;         /* text-gray-900 */
  line-height: 1.1;
}

/* Add to home.css */

/* === Toggle buttons (abstract / coverage / etc.) === */
.pub-buttons a {
  cursor: pointer;
  text-decoration: none;
  color: #4f46e5;       /* indigo-600 */
  font-family: monospace;
  margin-right: 6px;
  font-size: 0.9rem;
}

.pub-buttons a:hover {
  text-decoration: underline;
}

/* hidden blocks */
.pub-toggle-content {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border-left: 3px solid #e5e7eb;
  font-size: 0.9rem;
}

.pub-toggle-content ul {
  margin: 0;
  padding-left: 20px;
}


/* Button style for links like "abstract", "paper" */
.btn-link {
  cursor: pointer;
  color: #1d4ed8; /* blue-800 or your theme color */
  text-decoration: none;
  font-weight: 500;
  margin-right: 0.5rem;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Container for the paper info line */
.paper-details {
  margin-bottom: 0.5rem;
  font-size: 0.875rem; /* text-sm */
  color: #374151;      /* text-gray-700 */
}

/* The hidden content container */
.abstract, .coverage {
  display: none; /* Hidden by default */
  margin-top: 0.75rem;
  padding: 1rem;
  background-color: #f3f4f6; /* bg-gray-100 */
  border-radius: 0.375rem;   /* rounded-md */
  font-size: 0.875rem;       /* text-sm */
  color: #374151;            /* text-gray-700 */
  text-align: justify;
}

/* Cards (papers, teaching, work in progress) */
.card {
  background-color: #f9fafb;  /* bg-gray-50 */
  border: 1px solid #e5e7eb;  /* border-gray-200 */
  border-radius: 0.75rem;     /* rounded-lg */
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-md */
  padding: 1.5rem;            /* p-6 */
  margin-bottom: 2.5rem;      /* mb-10 or mb-8 */
}

/* Teaching & course cards spacing */
.card-teaching {
  margin-bottom: 2rem;        /* mb-8 */
}

/* Collapsible sections (details/summary) */
details {
  border-radius: 0.5rem;
}

summary {
  list-style: none;
  cursor: pointer;
  outline: none;
  /* Avoid extra padding from browser defaults */
  padding: 0;
}

summary::-webkit-details-marker {
  display: none;
}

/* Chevron animation */
.toggle-icon {
  transition: transform 0.15s ease-out;
}

details[open] .toggle-icon {
  transform: rotate(180deg);
}

/* Small pills / badges */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;   /* rounded-full */
  font-size: 0.75rem;      /* text-xs */
  font-weight: 600;
  padding: 0.125rem 0.625rem; /* py-0.5 px-2.5 */
  border-width: 1px;
  border-style: solid;
}

/* Specific badge color helpers */
.badge-yellow {
  background-color: #fef9c3;   /* bg-yellow-100 */
  color: #854d0e;              /* text-yellow-800 */
  border-color: #facc15;       /* border-yellow-200 */
}

.badge-blue {
  background-color: #dbeafe;   /* bg-blue-100 */
  color: #1d4ed8;              /* text-blue-800 */
  border-color: #bfdbfe;       /* border-blue-200 */
}

.badge-green {
  background-color: #dcfce7;   /* bg-green-100 */
  color: #166534;              /* text-green-800 */
  border-color: #bbf7d0;       /* approx border-green-200 */
}

.badge-gray {
  background-color: #e5e7eb;   /* bg-gray-200 */
  color: #374151;              /* text-gray-700 */
  border-color: #d1d5db;       /* border-gray-300 */
}

/* Icon sizes (PDF icon) */
.icon-4 {
  width: 0.9rem;
  height: 0.9rem;
}

/* Presentations box */
.presentations-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #d1d5db; /* gray-300 */
}

/* Presentation small pills */
.presentation-pill {
  background: #f3f4f6; /* gray-100 */
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.70rem;          /* smaller than text-xs */
  color: #374151;              /* gray-700 */
  border: 1px solid #e5e7eb;   /* gray-200 */
  display: inline-block;
  margin-bottom: 4px;
}

/* Tooltip container */
.tooltip {
  position: relative;
  cursor: help;
}

/* Tooltip hover box */
.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translate(-50%, -100%);
  
  background: #111827; /* gray-900 */
  color: white;
  font-size: 0.70rem;
  padding: 4px 8px;
  
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;

  transition: opacity 0.15s ease-in-out;
  
  z-index: 50;
}

/* Small arrow */
.tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translate(-50%, -2px);

  border: 5px solid transparent;
  border-top-color: #111827; /* arrow color */
  
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}

/* On hover — show tooltip */
.tooltip:hover::after,
.tooltip:hover::before {
  opacity: 1;
}



/* ============================
   MINIMAL MISTAKES STYLE SPLASH
   ============================ */

/* container */
.splash-intro {
  background: #ffffff;
  padding: 2rem 1rem;
}

/* feature row: side-by-side image + text */
.feature__wrapper {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  max-width: 75rem;            /* wider intro */
  margin: 0 auto;
}

/* left image container */
.feature__item--image {
  flex: 0 0 auto;              /* let image size control width */
}

/* IMAGE SETTINGS */
.feature__image {
  width: 525px;                /* << your requested size */
  height: auto;                /* keep proportions */
  object-fit: cover;           /* better visual framing */
  border-radius: 6px;         /* slightly rounded corners */
  display: block;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* right text */
.feature__item--text {
  flex: 1;
}

/* typography matching MM splash */
.page__title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111;
}

.page__lead {
  font-size: 1.2rem;     /* lead paragraph scaling */
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 1rem;
  color: #333;
}

/* normal paragraph spacing */
.splash-intro p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #444;
}

/* links */
.splash-intro a {
  color: #4f46e5;
  text-decoration: none;
}
.splash-intro a:hover {
  text-decoration: underline;
}

/* CV button styled like MM small button */
.btn-cv {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1px solid #d4a017;
  background: #fef9c3;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #8a5a00 !important;     /* FIX: override link color */
  text-decoration: none;
}
.btn-cv:hover {
  background: #fff3a0;
  border-color: #c29500;
  color: #744800 !important;     /* optional for hover */
}



/* DESKTOP tweaks */
@media (min-width: 769px) {
  .splash-intro {
    padding-right: 6rem;   /* extra space on the right */
    padding-left: 2rem;   /* extra space on the right */
  }
}

/* ====== MOBILE styles ====== */

/* MOBILE: vertical layout */
@media (max-width: 768px) {

  /* Add breathing room */
  .splash-intro {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Stack elements, reduce spacing */
  .feature__wrapper {
    flex-direction: column;
    text-align: left;
    gap: 1.25rem;          /* smaller spacing between image and text */
    width: 100%;
  }

  /* CENTER THE IMAGE */
  .feature__item--image {
    flex: none;
    width: 100%;
    display: flex;
    justify-content: center;   /* centers the image */
  }

  .feature__image {
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 0.5rem;     /* slightly reduced */
  }

  .feature__item--text {
    width: 100%;
    text-align: left;          /* keep text left-aligned */
  }

  /* Smaller text on mobile */
  .hero-title {
  font-size: 2.5rem;     /* smaller hero title on mobile */
 }

  .paper-title {
  font-size: 1.15rem;   /* smaller desktop size */
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: #111;
}

  .page__title {
    font-size: 1.6rem;
  }

  .page__lead {
    font-size: 1.05rem;
  }

  .splash-intro p {
    font-size: 0.90rem;
  }
}
