/* Fomantic UI custom touches */
.profile-section {
  text-align: center;
}

.ui.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.ui.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.profile-image {
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Masthead */
.masthead {
  background: #1b1c1d;
}

.masthead-inner {
  padding: 4rem 0;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center; /* center blocks */
  justify-content: center;
}

.masthead-subtitle {
  font-size: 1.25rem !important;
  margin: 2.5rem auto 2.5rem auto !important;
  text-align: center;
  line-height: 1.6;
  max-width: 1000px;
  font-weight: 400 !important;
  opacity: 0.9 !important;
}

.profile-bio {
  margin-top: 3rem;
  margin-bottom: 3.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.masthead .ui.big.buttons {
  margin-top: 2.5rem;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* Landing typography refinements */
.masthead-title {
  font-size: 2.75rem !important;
  letter-spacing: 0.2px;
}

@media (min-width: 992px) {
  .masthead-title {
    font-size: 3.25rem !important;
  }
  .masthead-subtitle {
    font-size: 1.35rem !important;
    max-width: 1100px;
  }
  .profile-bio {
    font-size: 1.0625rem; /* 17px */
    line-height: 1.85;
    max-width: 900px;
  }
}

@media (min-width: 1200px) {
  .masthead-title {
    font-size: 3.5rem !important;
  }
  .masthead-subtitle {
    font-size: 1.45rem !important;
    max-width: 1200px;
  }
}

/* Button group spacing in landing */
.masthead .ui.big.buttons .button {
  padding: 0.9rem 1.3rem;
}
.masthead .ui.big.buttons .or {
  margin: 0 1.25rem !important;
}

/* Profile */
.profile-name {
  margin-top: 1rem !important;
}

.profile-edu {
  font-weight: 400 !important;
}

.profile-bio {
  max-width: 800px;
  margin: 0 auto;
}

.social-list {
  justify-content: center;
}

.site-menu.ui.menu {
  border: none !important;
  box-shadow: none !important;
}

/* Modal layering to ensure visibility without Fomantic JS */
.ui.page.dimmer.modals {
  z-index: 1000;
}

.ui.modal.visible.active {
  z-index: 1100;
  display: block;
}

/* Dark theme */
body.theme-dark {
  background-color: #1e1e1e !important;
  color: #e6e6e6 !important;
}
body:not(.theme-dark) {
  background-color: #ffffff !important;
  color: #1b1c1d !important;
}

.theme-dark a {
  color: #8ab4f8;
}
.theme-dark a:hover {
  color: #a7c3fb;
}

.theme-dark .masthead {
  background: #1e1e1e;
}
.theme-dark .site-menu.ui.menu {
  background: transparent;
  border-bottom-color: #2a2a2a !important;
}

/* Nav text: brand and items */
.theme-dark .site-menu.ui.menu .item,
.theme-dark .site-menu.ui.menu .header.item,
.theme-dark .site-menu.ui.menu a.item,
.theme-dark .site-menu.ui.menu a.header.item {
  color: #e6e6e6 !important;
}

/* Toggle label text */
.theme-dark .ui.checkbox label {
  color: #e6e6e6 !important;
}

/* Global pusher inherits background to match theme */
#global-pusher {
  background: inherit;
}

.theme-dark .ui.card,
.theme-dark .ui.segment,
.theme-dark .ui.modal > .header,
.theme-dark .ui.modal > .content,
.theme-dark .ui.modal > .actions,
.theme-dark .ui.menu,
.theme-dark .ui.secondary.menu {
  background: #1e1e1e !important;
  color: #e6e6e6 !important;
  border-color: #2a2a2a !important;
}

/* Card border and dividers in dark mode */
.theme-dark .ui.card,
.theme-dark .ui.cards > .card {
  border-color: #2a2a2a !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.theme-dark .ui.card > .content,
.theme-dark .ui.cards > .card > .content {
  border-top-color: #2a2a2a !important;
}

.theme-dark .ui.card:hover,
.theme-dark .ui.cards > .card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.theme-dark .ui.menu .item,
.theme-dark .ui.cards > .card .content,
.theme-dark .ui.card > .content {
  color: #e6e6e6 !important;
}

/* Card title/description readability */
.theme-dark .ui.card > .content .header,
.theme-dark .ui.cards > .card .content .header {
  color: #ffffff !important;
}

.theme-dark .ui.card > .content .description,
.theme-dark .ui.cards > .card .content .description {
  color: #e6e6e6 !important;
}

.theme-dark .ui.card .meta {
  color: #bbbbbb !important;
}

/* Card extra content (bottom bar) */
.theme-dark .ui.card .extra,
.theme-dark .ui.cards > .card .extra {
  background: #1e1e1e !important;
  color: #bbbbbb !important;
  border-top-color: #2a2a2a !important;
}

/* WorkDetail modal/segment list headers (Tools / Role / Time Range) */
.theme-dark .work-detail .header,
.theme-dark .work-detail .ui.list .item .header {
  color: #e6e6e6 !important;
}

/* Tag filter menu: horizontal scroll when too many tags */
.tag-scroll.ui.menu {
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.tag-scroll.ui.menu .item {
  flex: 0 0 auto;
}

.theme-dark .ui.secondary.pointing.menu .active.item {
  border-color: #8ab4f8 !important;
  color: #8ab4f8 !important;
}

.theme-dark .ui.label {
  background: #2a2a2a;
  color: #e6e6e6;
}
.theme-dark .ui.button {
  background-color: #2a2a2a;
  color: #e6e6e6;
}

.theme-dark .ui.button:hover {
  background-color: #333 !important;
}

/* Filters row layout and selected tags scroller */
.filters-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.filters-row .left,
.filters-row .right {
  flex: 0 0 auto;
}
.filters-row .middle {
  flex: 1 1 auto;
  min-width: 0;
}
.selected-tags-scroll {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.selected-tags-scroll .ui.label {
  margin: 0;
  cursor: pointer;
}

/* Left edge sidebar handle */
.filters-handle {
  display: none;
  position: fixed;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}
.filters-handle.visible {
  display: inline-flex;
}
