/*-- scss:rules --*/

// Typography polish

body {
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

code, pre, kbd, samp {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

@media (min-width: 1200px) {
  main.content {
    max-width: 820px;
  }
}

// =========================================================================
// Home: hero band
// =========================================================================

.hero {
  background: #f1ece1;                         // warm panel tone
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 2.25rem 1rem;
  margin: 0 -1rem 2rem;                         // break out of content column
}

@media (min-width: 992px) {
  .hero {
    padding: 3rem 2rem;
    margin-left: calc(-1 * ((100vw - 100%) / 2));
    margin-right: calc(-1 * ((100vw - 100%) / 2));
  }
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
  }
}

.hero-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  justify-self: center;
}

@media (min-width: 768px) {
  .hero-photo {
    width: 180px;
    height: 180px;
  }
}

.hero-text h1 {
  margin: 0 0 0.25rem;
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1.15;
}

.hero-text .hero-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  opacity: 0.8;
}

.hero-text .hero-strap {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  line-height: 1.45;
  max-width: 38em;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-ctas a {
  display: inline-block;
  padding: 0.35rem 0.95rem;
  border: 1px solid rgba(63, 106, 146, 0.55);
  border-radius: 999px;
  color: #3f6a92;
  background: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hero-ctas a:hover {
  background: #3f6a92;
  color: #fff;
  border-color: #3f6a92;
}

// =========================================================================
// Home: featured work carousel
// =========================================================================

.featured-section {
  margin: 2.5rem 0;
}

.featured-section h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 1rem;
  font-weight: 600;
}

#featured-carousel {
  background: #fdfcf8;
  border: 2px solid rgba(63, 106, 146, 0.35);
  border-radius: 10px;
  padding: 2rem 3rem;
  min-height: 200px;
}

#featured-carousel .featured-paper {
  max-width: 46rem;
  margin: 0 auto;
  text-align: left;
}

#featured-carousel .featured-paper h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  line-height: 1.25;
}

#featured-carousel .featured-paper .lead {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

#featured-carousel .featured-paper .meta {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  opacity: 0.7;
}

#featured-carousel .featured-paper .btn {
  font-size: 0.9rem;
}

#featured-carousel .carousel-control-prev,
#featured-carousel .carousel-control-next {
  width: 3rem;
  opacity: 0.55;
}

#featured-carousel .carousel-control-prev-icon,
#featured-carousel .carousel-control-next-icon {
  filter: invert(0.4);
}

#featured-carousel .carousel-indicators {
  bottom: -2.25rem;
  margin-bottom: 0;
}

#featured-carousel .carousel-indicators [data-bs-target] {
  background-color: #3f6a92;
  opacity: 0.4;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  margin: 0 4px;
}

#featured-carousel .carousel-indicators .active {
  opacity: 1;
}

// =========================================================================
// Home: 4-up section blocks
// =========================================================================

.home-blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 3.5rem 0 1.5rem;
}

@media (min-width: 576px) {
  .home-blocks { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .home-blocks { grid-template-columns: repeat(4, 1fr); }
}

.home-blocks a.block {
  display: block;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-blocks a.block:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 106, 146, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.home-blocks a.block h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: #3f6a92;
}

.home-blocks a.block p {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.85;
}

.home-blocks a.block .more {
  font-size: 0.85rem;
  color: #3f6a92;
  opacity: 0.9;
}

// =========================================================================
// Existing shared components
// =========================================================================

// Headshot on home page (legacy; left for any remaining usage)
.headshot {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

// Card grid for software / teaching pages
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card-grid .card {
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card-grid .card:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 106, 146, 0.55);
}

.card-grid .card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.card-grid .card .meta {
  font-size: 0.85em;
  opacity: 0.75;
  margin-top: 0.5rem;
}

// Footer
.nav-footer {
  font-size: 0.9em;
  opacity: 0.85;
}

// Publications page — paper entries
.pub {
  margin-bottom: 1.25rem;
}

.pub .pub-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  margin-top: 0.25rem;
  font-size: 0.88em;
  align-items: baseline;
}

.pub .pub-links a,
.pub .pub-abstract-toggle {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  opacity: 0.85;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.pub .pub-links a:hover,
.pub .pub-abstract-toggle:hover {
  opacity: 1;
  border-color: #3f6a92;
}

.pub details.pub-abstract {
  margin-top: 0.4rem;
}

.pub details.pub-abstract > summary {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 999px;
  font-size: 0.88em;
  opacity: 0.85;
  cursor: pointer;
  list-style: none;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.pub details.pub-abstract > summary::-webkit-details-marker {
  display: none;
}

.pub details.pub-abstract > summary::before {
  content: "▸ ";
  display: inline-block;
  width: 0.9em;
  transition: transform 0.15s ease;
}

.pub details.pub-abstract[open] > summary::before {
  content: "▾ ";
}

.pub details.pub-abstract > summary:hover {
  opacity: 1;
  border-color: #3f6a92;
}

.pub details.pub-abstract > .pub-abstract-body {
  margin: 0.6rem 0 0;
  padding: 0.6rem 0.9rem;
  border-left: 2px solid rgba(63, 106, 146, 0.6);
  background: rgba(128, 128, 128, 0.05);
  font-size: 0.96em;
  line-height: 1.55;
}

// Print
@media print {
  .navbar, .nav-footer, .sidebar { display: none !important; }
  body { color: #000; background: #fff; }
  .pub details.pub-abstract { display: none; }
  #featured-carousel, .hero, .home-blocks { display: none; }
}
