/* Omar Qasem homepage styles. Colors live in :root below. */
  /* ===== Colors: change these to restyle the whole site ===== */
  :root{
    --navy:#0b2a5b; --navy-2:#183d78; --accent:#f5a524;
    --bg:#f4f6fa; --card:#ffffff; --ink:#121826; --muted:#4a5468;
    --link:#0b3d91; --on-navy:#dbe5f7; --on-navy-2:#b8c7e3;
  }
  *{box-sizing:border-box}
  html{scroll-behavior:smooth}
  body{margin:0;background:var(--bg);color:var(--ink);font:400 1rem/1.6 Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
  a{color:var(--link)} a:hover{color:#072a66}
  h1,h2,h3{font-family:"Space Grotesk",Inter,sans-serif;line-height:1.15}
  .wrap{max-width:1160px;margin:0 auto;padding:0 1.5rem}

  /* Header + hero */
  .hero{background:var(--navy);color:#fff}
  nav{display:flex;flex-wrap:wrap;gap:1rem 2rem;align-items:center;justify-content:space-between;padding:1.25rem 0}
  .logo{font-family:"Space Grotesk",sans-serif;font-weight:700;font-size:1.25rem;color:#fff;text-decoration:none}
  .nav-links{display:flex;flex-wrap:wrap;gap:.25rem 1.5rem}
  .nav-links a{color:var(--on-navy);text-decoration:none;font-weight:500;font-size:.95rem;padding:.4rem 0}
  .nav-links a:hover{color:#fff}
  .hero-body{display:flex;flex-wrap:wrap;gap:3rem;align-items:center;padding:3.5rem 0 4.5rem}
  .hero-text{flex:1 1 520px;min-width:0}
  .eyebrow{margin:0;line-height:1.7;font-weight:600;font-size:.85rem;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}
  .hero h1{margin:.75rem 0 0;font-weight:700;font-size:clamp(2.6rem,7vw,3.75rem)}
  .tagline{margin:1.25rem 0 0;font-size:1.2rem;color:var(--on-navy);max-width:36rem}
  .meta{margin:.75rem 0 0;color:var(--on-navy-2)}
  .buttons{margin-top:2rem;display:flex;flex-wrap:wrap;gap:.75rem}
  .btn{display:inline-flex;align-items:center;min-height:44px;padding:0 1.4rem;border-radius:8px;font-weight:600;text-decoration:none}
  .btn-primary{background:var(--accent);color:var(--ink)} .btn-primary:hover{color:var(--ink);filter:brightness(1.05)}
  .btn-ghost{border:1.5px solid #8ea6d1;color:#fff} .btn-ghost:hover{color:#fff;background:rgba(255,255,255,.06)}
  .photo{flex:0 0 260px;height:300px;border-radius:16px;background:var(--navy-2);position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center}
  .photo span{font-family:"Space Grotesk",sans-serif;font-weight:700;font-size:4rem;color:var(--on-navy-2)}
  .photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

  /* Sections */
  main section{padding-top:4rem}
  main h2{margin:0 0 1.5rem;font-weight:700;font-size:2rem}
  .about p{max-width:52rem;margin:0 0 1rem;color:#2b3345;font-size:1.05rem;text-align:justify}
  .cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:1.25rem}
  .card{background:var(--card);border-radius:14px;padding:1.75rem;box-shadow:0 1px 3px rgba(18,24,38,.08)}
  .card .num{margin:0;font-family:"Space Grotesk",sans-serif;font-weight:700;font-size:.9rem;color:var(--link)}
  .card h3{margin:.5rem 0;font-size:1.2rem;font-weight:600;font-family:Inter,sans-serif}
  .card p{margin:0;color:var(--muted)}

  .pub-head{display:flex;flex-wrap:wrap;gap:1rem;align-items:baseline;justify-content:space-between;margin-bottom:1.5rem}
  .pub-head h2{margin:0}
  .pub-group{margin:0 0 .75rem;font-size:.85rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
  .pubs{list-style:none;margin:0 0 2rem;padding:0;display:flex;flex-direction:column;gap:.75rem}
  .pub{background:var(--card);border-radius:12px;padding:1.2rem 1.5rem;display:flex;flex-wrap:wrap;gap:.5rem 1.5rem;align-items:center;justify-content:space-between}
  .pub div{flex:1 1 480px;min-width:0}
  .pub .title{margin:0;font-weight:600}
  .pub .venue{margin:.25rem 0 0;color:var(--muted);font-size:.95rem}
  .pub .links{margin:.4rem 0 0;font-size:.9rem;font-weight:600}
  .year{padding:.25rem .75rem;border-radius:999px;background:#e3eaf7;color:var(--link);font-weight:600;font-size:.85rem}

  .chips{display:flex;flex-wrap:wrap;gap:.75rem;list-style:none;margin:0;padding:0}
  .chips li{padding:.7rem 1.2rem;border-radius:10px;background:var(--card);font-weight:500}

  .contact{margin-top:4rem;background:var(--navy);color:#fff;border-radius:16px;padding:2.5rem;display:flex;flex-wrap:wrap;gap:1.5rem;align-items:center;justify-content:space-between}
  .contact h2{margin:0;font-size:1.75rem}
  .contact p{margin:.5rem 0 0;color:var(--on-navy)}
  .profiles{display:flex;flex-wrap:wrap;gap:.5rem 1.25rem;margin-top:1rem}
  .profiles a{color:var(--on-navy);font-weight:500}
  .profiles a:hover{color:#fff}
  footer{padding:2rem 0;font-size:.85rem;color:#5b6478}

  @media (max-width:640px){
    .hero-body{padding:2rem 0 3rem;gap:2rem}
    .photo{flex-basis:100%;height:280px;order:-1;max-width:240px}
    .contact{padding:1.75rem}
    main h2{font-size:1.7rem}
    .about p{hyphens:auto;-webkit-hyphens:auto}
    .eyebrow{font-size:.74rem;letter-spacing:.04em}
  }

  /* Shared bits */
  .nav-links a[aria-current="page"]{color:#fff;box-shadow:inset 0 -2px 0 var(--accent)}
  .alt-email{margin:.6rem 0 0;font-size:.9rem;color:var(--on-navy-2)}
  .alt-email a{color:var(--on-navy)}

  /* Publications page */
  .page-hero{padding:2rem 0 3rem}
  .page-hero h1{margin:.5rem 0 0;font-weight:700;font-size:clamp(2.2rem,6vw,3rem)}
  .page-hero p{margin:1rem 0 0;color:var(--on-navy);max-width:40rem}
  .page-hero .profiles{margin-top:1.25rem}
  .jump{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 2rem;padding:0;list-style:none}
  .jump a{display:inline-flex;align-items:center;min-height:40px;padding:0 1rem;border-radius:999px;background:var(--card);text-decoration:none;font-weight:600;font-size:.9rem}
  .pub-section h2{display:flex;align-items:baseline;gap:.75rem}
  .count{font-family:Inter,sans-serif;font-size:1rem;font-weight:600;color:var(--muted)}
  footer.wrap{padding-top:2rem;padding-bottom:2rem}
  .hero h1 .degree{font-weight:500;color:var(--on-navy)}

  /* Profile icons (Google Scholar, ORCID, dblp: Simple Icons, CC0; LinkedIn: Font Awesome Free, CC BY 4.0) */
  .icons{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1.5rem}
  .icons a{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.08);border:1px solid rgba(219,229,247,.35);color:#fff;transition:background .15s,color .15s,border-color .15s}
  .icons a:hover{background:var(--accent);border-color:var(--accent);color:var(--ink)}
  .icons svg{width:20px;height:20px}

  /* News */
  .news-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.75rem}
  .news-item{background:var(--card);border-radius:12px;padding:1.1rem 1.5rem;display:flex;flex-wrap:wrap;gap:.5rem 1.25rem;align-items:baseline}
  .news-item p{margin:0;flex:1 1 420px;min-width:0}
  .tag{flex:0 0 auto;min-width:6.5rem;text-align:center;padding:.2rem .7rem;border-radius:999px;font-size:.8rem;font-weight:600;background:#e3eaf7;color:var(--link)}
  .tag-award,.tag-recognition{background:#fdecc8;color:#7a4a00}
  .tag-appointment,.tag-milestone{background:#dff3ea;color:#1d5c3f}
  .news-year h2{margin-bottom:1rem}
  /* Teaching */
  .teach-intro{margin:0 0 1rem;color:var(--muted)}
  .teach-chips{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}
  .teach-chips li{display:flex;flex-direction:column;gap:.2rem;padding:1rem 1.2rem}
  .teach-chips b{color:var(--link);font-size:.85rem}
  .course-list{list-style:none;margin:.75rem 0 0;padding:0;display:flex;flex-direction:column;gap:.35rem;color:var(--muted)}
  .course-list li{display:grid;grid-template-columns:5.4rem 1fr;gap:.5rem}
  .course-list li:not(:has(b)){display:block}
  .course-list b{color:var(--ink);font-weight:600}
  .news-date{display:block;font-size:.85rem;font-weight:600;color:var(--muted);margin-bottom:.15rem}
  /* Services */
  .svc-list{list-style:none;margin:.75rem 0 0;padding:0;display:flex;flex-direction:column;gap:.6rem}
  .svc-list li{display:grid;grid-template-columns:7.5rem 1fr;gap:.75rem;color:var(--muted)}
  .svc-list .when{font-weight:600;font-size:.9rem;color:var(--link)}
  .svc-list strong{color:var(--ink)}
  @media (max-width:640px){.svc-list li{grid-template-columns:1fr;gap:0}}

  /* ===== Header: theme switch ===== */
  nav .nav-links{margin-left:auto}
  .theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:1px solid rgba(219,229,247,.35);background:transparent;color:var(--on-navy);cursor:pointer;padding:0}
  .theme-toggle:hover{color:var(--accent);border-color:var(--accent)}
  .theme-toggle svg{width:18px;height:18px}
  .theme-toggle .i-sun{display:none}
  [data-theme="dark"] .theme-toggle .i-sun{display:block}
  [data-theme="dark"] .theme-toggle .i-moon{display:none}
  .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

  /* ===== Publications: filters, badges, abstracts ===== */
  .pub-filters{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;margin-bottom:.5rem}
  .search{flex:1 1 320px;display:flex;align-items:center;gap:.5rem;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:0 .9rem;min-height:46px;color:var(--muted)}
  .search svg{width:18px;height:18px;flex:0 0 auto}
  .search input{flex:1;border:0;background:transparent;font:inherit;color:var(--ink);min-height:44px;outline:none}
  .search:focus-within{border-color:var(--link);box-shadow:0 0 0 3px rgba(80,130,220,.25)}
  .year-select select{min-height:46px;border-radius:10px;border:1px solid var(--line);background:var(--card);color:var(--ink);font:inherit;padding:0 .9rem}
  .chip-row{flex:1 1 100%;display:flex;flex-wrap:wrap;gap:.5rem}
  .chip-btn{min-height:38px;padding:0 1rem;border-radius:999px;border:1px solid var(--line);background:var(--card);color:var(--ink);font:inherit;font-size:.9rem;font-weight:500;cursor:pointer}
  .chip-btn:hover{border-color:var(--link)}
  .chip-btn[aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:#fff}
  .pub-count{flex:1 1 100%;margin:.25rem 0 0;color:var(--muted);font-size:.9rem}
  #pub-results .pub-section{padding-top:1.5rem}
  .badges{margin:.4rem 0 0;display:flex;flex-wrap:wrap;gap:.4rem}
  .badge{padding:.15rem .6rem;border-radius:999px;font-size:.78rem;font-weight:600;text-transform:capitalize}
  .badge-status{background:#dff3ea;color:#1d5c3f}
  .badge-award{background:#fdecc8;color:#7a4a00}
  .pub .links{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem 1rem}
  .pub-btn{border:0;background:none;padding:.2rem 0;font:inherit;font-weight:600;font-size:.9rem;color:var(--link);cursor:pointer;text-decoration:underline;text-underline-offset:2px}
  .abstract{margin-top:.75rem;padding:1rem 1.1rem;border-radius:10px;background:var(--bg);color:var(--muted);font-size:.95rem;line-height:1.65;text-align:justify}
  .empty{color:var(--muted)}

  /* ===== Fade-in on scroll ===== */
  .reveal{opacity:0;transform:translateY(14px);transition:opacity .6s ease,transform .6s ease}
  .reveal.in{opacity:1;transform:none}
  @media (prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none}}

  /* ===== Dark mode ===== */
  :root{--line:#dfe5ef}
  [data-theme="dark"]{
    --navy:#0a1730; --navy-2:#152a4d; --bg:#0d1422; --card:#151e31; --ink:#e7ecf5; --muted:#a8b3c7;
    --link:#8fb5ff; --line:#26324a; color-scheme:dark;
  }
  [data-theme="dark"] a:hover{color:#b9d0ff}
  [data-theme="dark"] .about p{color:#cfd7e6}
  [data-theme="dark"] .card{box-shadow:none;border:1px solid var(--line)}
  [data-theme="dark"] .pub,[data-theme="dark"] .news-item,[data-theme="dark"] .chips li{border:1px solid var(--line)}
  [data-theme="dark"] .year,[data-theme="dark"] .tag{background:#1e2d4d;color:#a9c4ff}
  [data-theme="dark"] .tag-award,[data-theme="dark"] .tag-recognition,[data-theme="dark"] .badge-award{background:#3a2c0e;color:#f7cf7a}
  [data-theme="dark"] .tag-appointment,[data-theme="dark"] .tag-milestone,[data-theme="dark"] .badge-status{background:#12352a;color:#8fe0bb}
  [data-theme="dark"] .contact{border:1px solid var(--line)}
  [data-theme="dark"] footer{color:var(--muted)}
  [data-theme="dark"] .chip-btn[aria-pressed="true"]{background:var(--link);border-color:var(--link);color:#0d1422}
  @media (max-width:640px){
    nav .theme-toggle{order:2;margin-left:auto}
    nav .nav-links{order:3;flex-basis:100%;margin-left:0}
    .chip-row{flex-wrap:nowrap;overflow-x:auto;padding-bottom:.25rem;scrollbar-width:none}
    .chip-row::-webkit-scrollbar{display:none}
    .chip-btn{flex:0 0 auto}
    .year-select{flex:1 1 100%}
    .year-select select{width:100%}
  }
