/* ---------- Base theme variables ---------- */

:root {
    --bg: #ffffff;
    --bg-alt: #f5f5f7;
    --text: #1d1d1f;
    --muted: #555;
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.12);
    --border: #e5e5ea;
    --card: #ffffff;
  }
  
  /* Dark mode overrides (toggled by JS) */
  :root[data-theme="dark"] {
    --bg: #0b1120;
    --bg-alt: #020617;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.15);
    --border: #1f2937;
    --card: #020617;
  }
  
  /* ---------- Global styles ---------- */
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html,
  body {
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
      "Segoe UI", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
  }

  /* --------- Global text justification --------- */
  p,
  .pub-list li {
    text-align: justify;
    text-justify: inter-word;
  }
  
  /* A simple centered layout */
  .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
  }
  
  /* ---------- Header / nav ---------- */
  
  .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    border-bottom: 1px solid var(--border);
  }
  
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
  }
  
  .logo a {
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
  }
  
  .nav-links {
    display: flex;
    gap: 1rem;
    font-size: 0.95rem;
  }
  
  .nav-links a {
    text-decoration: none;
    color: var(--muted);
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
  }
  
  .nav-links a:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }
  
  .theme-toggle {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    background: var(--card);
    cursor: pointer;
    font-size: 0.9rem;
  }
  
  /* ---------- Hero section ---------- */
  
  .hero {
    padding: 3rem 0 2.5rem;
  }
  
  .hero-grid {
    display: grid;
    /* grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.8fr); */
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
  }
  
  .tagline {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--muted);
    margin-bottom: 0.5rem;
  }
  
  .tagline span {
    color: var(--accent);
  }
  
  .hero h1 {
    font-size: clamp(2.1rem, 4vw, 2.8rem);
    margin: 0.2rem 0 0.6rem;
  }
  
  .hero-description {
    color: var(--muted);
    max-width: 36rem;
  }
  
  .hero-actions {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
  }
  
  .btn.primary {
    background: var(--accent);
    color: #ffffff;
  }
  
  .btn.primary:hover {
    filter: brightness(1.05);
  }
  
  .btn.secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
  }
  
  .btn.secondary:hover {
    background: var(--accent-soft);
  }
  
  .hero-photo {
    display: flex;
    justify-content: center;
  }
  
  .hero-photo img {
    width: 360px !important;
    height: 360px !important;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid var(--border);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  }
  
  /* ---------- Sections ---------- */
  
  .section {
    padding: 2.5rem 0;
  }
  
  .section-alt {
    background: var(--bg-alt);
  }
  
  .section h2 {
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 1rem;
  }
  
  /* Paragraphs & lists */
  .section p {
    margin: 0.3rem 0 0.8rem;
  }
  
  .item-list,
  .pub-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
  }
  
  .item-list li,
  .pub-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  
  .item-list li:last-child,
  .pub-list li:last-child {
    border-bottom: none;
  }
  
  .pub-title {
    font-weight: 600;
  }
  
  .pub-authors,
  .pub-venue {
    font-size: 0.9rem;
    color: var(--muted);
  }

  /* Optional: nicer styling for clickable publication titles */
  /* Prevent link-look on publication titles */
  a.pub-title {
    color: var(--text);          /* same color as normal text */
    text-decoration: none;       /* no underline */
  }

  a.pub-title:hover {
    color: var(--text);          /* no color change on hover */
    text-decoration: none;       /* no underline on hover */
  }

  /* Hover background box for publication titles */
  a.pub-title {
    padding: 0.15rem 0.25rem 0.15rem 0;      /* Small padding to show box */
    border-radius: 6px;            /* Rounded corners like navbar */
    transition: background 0.15s ease;
  }

  a.pub-title:hover {
    background: #e5e5e5;           /* Light grey hover box (light mode) */
  }

  /* Dark mode version */
  :root[data-theme="dark"] a.pub-title:hover {
    background: rgba(255, 255, 255, 0.10);  /* subtle light grey for dark mode */
  }

  
  /* Contact list */
  .contact-list {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 0;
  }
  
  .contact-list li {
    margin-bottom: 0.4rem;
  }
  
  /* ---------- Footer ---------- */
  
  .site-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    font-size: 0.9rem;
  }
  
  .footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
  }
  
  .footer-right {
    text-align: right;
  }
  
  /* ---------- Links ---------- */
  
  a {
    color: var(--accent);
  }
  
  a:hover {
    text-decoration: underline;
  }
  
  /* ---------- Responsive adjustments ---------- */
  
  @media (max-width: 768px) {
    .header-inner {
      gap: 0.75rem;
      flex-wrap: wrap;          /* allow logo + nav + button to wrap */
    }
  
    .nav-links {
      display: flex;            /* show nav on mobile */
      flex-wrap: wrap;
      gap: 0.5rem;
      font-size: 0.9rem;
    }
  
    .hero-grid {
      grid-template-columns: minmax(0, 1fr);
      text-align: left;
    }
  
    .hero-photo {
      order: -1;
      margin-bottom: 1rem;
    }
  
    .footer-inner {
      flex-direction: column;
      text-align: left;
    }
  
    .footer-right {
      text-align: left;
    }
  }
  
  