/** Hamed Academic Dashboard 5.0.3 — readability and interaction refinements. */

/* Shared record-selector typography: match the strong Latest scholarly records treatment. */
.had-project-index-row,
.had-career-index-row,
.had-code-index-row,
.had-credential-scroll>button,
.had-blog-console [data-had-blog-row],
.had-teaching-stream-row,
.had-collection-records .had-record-row{
  min-height:82px!important;
  padding:12px 14px!important;
  gap:12px!important;
}
.had-project-index-row label,.had-career-index-row label,.had-code-index-row label,
.had-credential-scroll>button small,.had-blog-console [data-had-blog-row] label,
.had-teaching-stream-row label,.had-collection-records .had-record-row label{
  font-size:10px!important;line-height:1.3!important;letter-spacing:.055em!important;
}
.had-project-index-row b,.had-career-index-row b,.had-code-index-row b,
.had-credential-scroll>button b,.had-blog-console [data-had-blog-row] b,
.had-teaching-stream-row b,.had-collection-records .had-record-row b{
  font-size:13px!important;line-height:1.34!important;font-weight:750!important;
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
}
.had-project-index-row em,.had-career-index-row em,.had-code-index-row em,
.had-credential-scroll>button small,.had-blog-console [data-had-blog-row] em,
.had-teaching-stream-row em,.had-collection-records .had-record-row em,
.had-collection-records .had-record-row p{
  font-size:11px!important;line-height:1.42!important;
}
.had-project-index-row em,.had-career-index-row em,.had-code-index-row em{
  white-space:normal!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;
}
.had-record-index-panel .had-section-title h2,.had-credential-list .had-section-title h2,.had-blog-console .had-section-title h2,.had-collection-records>.had-section-title h2{font-size:15px!important}
.had-record-index-panel .had-section-title span,.had-credential-list .had-section-title span,.had-blog-console .had-section-title span,.had-collection-records>.had-section-title span{font-size:9px!important;line-height:1.3!important}

/* Code Portfolio: generated Python/data-analysis visuals. */
.had-portfolio-v502 .had-code-project-visual.had-code-project-image{
  position:relative!important;height:118px!important;min-height:118px!important;margin:-12px -12px 10px!important;padding:0!important;
  display:block!important;overflow:hidden!important;background:#061c29!important;border-bottom:1px solid #1b5366!important;
}
.had-portfolio-v502 .had-code-project-image img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;display:block!important;filter:saturate(1.04) contrast(1.04)}
.had-code-visual-badge{position:absolute;left:10px;top:9px;padding:4px 7px;border:1px solid rgba(32,216,233,.72);border-radius:3px;background:rgba(3,20,31,.82);color:#25d9e9;font:700 8px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.09em;text-transform:uppercase;backdrop-filter:blur(5px)}
.had-portfolio-v502 .had-code-project{min-height:338px!important}

/* Home identity: no CV request and no copy collisions. */
.had-home-v320 .had-profile-copy{gap:0!important;min-height:0!important;overflow:visible!important;justify-content:flex-start!important}
.had-home-v320 .had-profile-copy .had-kicker{flex:0 0 auto!important;margin-bottom:2px!important}
.had-home-v320 .had-profile-copy h1{flex:0 0 auto!important;overflow-wrap:normal!important;word-break:normal!important;white-space:normal!important;font-size:clamp(24px,1.85vw,34px)!important;line-height:1.04!important}
.had-home-v320 .had-profile-role{flex:0 0 auto!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.25!important}
.had-home-v320 .had-profile-interests{flex:0 0 auto!important;margin-top:3px!important;padding-top:7px!important}
.had-home-v320 .had-profile-interests>div{gap:5px!important}
.had-home-v320 .had-profile-interests span{padding:4px 7px!important;font-size:8.5px!important;line-height:1.12!important}
.had-home-v320>.had-profile-card .had-profile-languages{flex:0 0 auto!important;margin-top:7px!important;padding-top:7px!important}
.had-home-v320>.had-profile-card .had-profile-languages>small{margin-bottom:4px!important}
.had-home-v320>.had-profile-card .had-profile-languages>div{gap:5px!important}
.had-home-v320>.had-profile-card .had-profile-languages span{min-height:34px!important;padding:5px 7px!important}
.had-home-v320>.had-profile-card .had-profile-languages b{font-size:8.5px!important}.had-home-v320>.had-profile-card .had-profile-languages em{font-size:6.8px!important}

/* Annual trend panels: use the available visual area while keeping labels inside. */
@media(min-width:901px){
  [data-had-collection-type="journal-papers"] .had-analytics-grid,
  [data-had-collection-type="book"] .had-analytics-grid,
  [data-had-collection-type="theses"] .had-analytics-grid,
  [data-had-collection-type="persian-articles"] .had-analytics-grid,
  [data-had-collection-type="conference-presentations"] .had-analytics-grid,
  [data-had-collection-type="editorial-referee"] .had-analytics-grid,
  [data-had-collection-type="media"] .had-analytics-grid,
  [data-had-collection-type="teaching-experience"] .had-analytics-grid{
    grid-template-rows:minmax(145px,.64fr) minmax(235px,1.22fr)!important;
  }
  [data-had-collection-type="journal-papers"] .had-journal-trend-panel,
  [data-had-collection-type="book"] .had-book-trend-panel,
  [data-had-collection-type="theses"] .had-thesis-trend-panel,
  [data-had-collection-type="persian-articles"] .had-persian-trend-panel,
  [data-had-collection-type="conference-presentations"] .had-presentation-trend-panel,
  [data-had-collection-type="editorial-referee"] .had-editorial-trend-panel,
  [data-had-collection-type="media"] .had-media-trend-panel,
  [data-had-collection-type="teaching-experience"] .had-teaching-trend-panel{
    min-height:235px!important;max-height:315px!important;height:clamp(235px,34vh,315px)!important;
  }
  .had-journal-trend-panel [data-had-journal-analytics-body="years"],
  .had-book-trend-panel [data-had-book-analytics-body="years"],
  .had-thesis-trend-panel [data-had-thesis-analytics-body="years"],
  .had-persian-trend-panel [data-had-persian-analytics-body="years"],
  .had-presentation-trend-panel [data-had-presentation-analytics-body="years"],
  .had-editorial-trend-panel [data-had-editorial-analytics-body="years"],
  .had-media-trend-panel [data-had-media-analytics-body="years"],
  .had-teaching-trend-panel [data-had-teaching-analytics-body="years"],
  .had-journal-trend-panel .had-year-trend,.had-book-trend-panel .had-year-trend,.had-thesis-trend-panel .had-year-trend,.had-persian-trend-panel .had-year-trend,.had-presentation-trend-panel .had-year-trend,.had-editorial-trend-panel .had-year-trend,.had-media-trend-panel .had-year-trend,.had-teaching-trend-panel .had-year-trend{
    min-height:202px!important;max-height:282px!important;height:calc(100% - 1px)!important;
  }

  .had-journal-trend-panel .had-year-trend>svg,.had-book-trend-panel .had-year-trend>svg,.had-thesis-trend-panel .had-year-trend>svg,.had-persian-trend-panel .had-year-trend>svg,.had-presentation-trend-panel .had-year-trend>svg,.had-editorial-trend-panel .had-year-trend>svg,.had-media-trend-panel .had-year-trend>svg,.had-teaching-trend-panel .had-year-trend>svg{
    width:100%!important;height:100%!important;min-height:202px!important;max-height:282px!important;display:block!important;overflow:visible!important;
  }
}

/* Sheffield supplied image reads well in news and the detail drawer. */
.had-news-media[style*="university-of-sheffield"] .had-news-image-base{background-position:center center!important}

@media(max-width:1100px) and (min-width:901px){
  .had-project-index-row b,.had-career-index-row b,.had-code-index-row b,.had-credential-scroll>button b,.had-blog-console [data-had-blog-row] b,.had-teaching-stream-row b,.had-collection-records .had-record-row b{font-size:12px!important}
  .had-project-index-row em,.had-career-index-row em,.had-code-index-row em,.had-credential-scroll>button small,.had-blog-console [data-had-blog-row] em,.had-teaching-stream-row em,.had-collection-records .had-record-row em{font-size:10px!important}
}
