/*--------------------------------------------------------------
# sections.css
# Layers the new portfolio sections on top of the original theme.
# style.css is left untouched — everything here is additive and uses the
# existing palette (crimson / white / #f7f7f7 / Poppins).
--------------------------------------------------------------*/

:root {
  /* Derived from the existing accent — no new hues introduced */
  --brand-gradient: linear-gradient(135deg, #e31837 0%, #ff5f7d 100%);
  --brand-tint: rgba(227, 24, 55, 0.07);
  --brand-tint-strong: rgba(227, 24, 55, 0.14);
  --brand-glow: 0 18px 40px rgba(227, 24, 55, 0.16);
  --brand-deep: #c11330;
  --line: #ececee;
  --muted: #7a7d84;
  --card-radius: 14px;
}

/*--------------------------------------------------------------
# Small refinements to the base theme (behaviour, not looks)
--------------------------------------------------------------*/
.nav-menu a,
.nav-menu a:focus,
.nav-menu a i,
.nav-menu a:focus i {
  color: #6f7180;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-tertiary);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 15px;
  z-index: 9999;
  padding: 10px 18px;
  border-radius: 4px;
  background: var(--color-tertiary);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 15px;
  color: var(--color-primary);
}

.mobile-nav-toggle,
.back-to-top {
  padding: 0;
  border: 0;
}

/* Justified copy turns into rivers of whitespace on a phone */
@media (max-width: 575px) {

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  li {
    text-align: left;
  }
}

/*--------------------------------------------------------------
# Employer / institution marks
--------------------------------------------------------------*/
/* Company logos are square app-style marks, so they get a fixed small box.
   The university wordmarks keep the original 100px treatment. */
.resume .resume-item .institution-icon--mark {
  width: 44px;
  height: 44px;
  margin: 0 12px 0 0;
  object-fit: contain;
  border-radius: 10px;
}

/*--------------------------------------------------------------
# Hero flourishes
--------------------------------------------------------------*/
#hero {
  position: relative;
}

#hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(780px, 92vw);
  height: min(780px, 92vw);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 24, 55, 0.11) 0%, rgba(227, 24, 55, 0) 68%);
  z-index: 1;
  pointer-events: none;
}

.hero-cue {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  border: 2px solid var(--color-tertiary-bright);
  border-radius: 50%;
  color: var(--color-tertiary);
  font-size: 22px;
  animation: hero-bob 2.2s ease-in-out infinite;
  transition: 0.3s;
}

.hero-cue:hover {
  background: var(--color-tertiary);
  color: var(--color-primary);
  border-color: var(--color-tertiary);
}

@keyframes hero-bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(7px);
  }
}

/*--------------------------------------------------------------
# Section furniture
--------------------------------------------------------------*/
.section-alt {
  background: var(--color-secondary);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-tertiary);
}

.section-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--brand-gradient);
}

.section-title p {
  color: var(--muted);
}

/* The base theme justifies all copy; inside the narrower new cards that opens
   up rivers of whitespace, so those blocks stay ranged left. */
.fact-label,
.pcard-lead,
.metric span,
.tick li,
.pub p,
.award p,
.contact-panel p,
.contact-list li {
  text-align: left;
}

/*--------------------------------------------------------------
# Buttons
--------------------------------------------------------------*/
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 50px;
  color: var(--color-primary) !important;
  background: var(--brand-gradient);
  box-shadow: var(--brand-glow);
  transition: 0.3s;
}

.btn-brand:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  color: var(--color-primary) !important;
}

.btn-brand--outline {
  background: none;
  box-shadow: none;
  color: var(--color-tertiary) !important;
  border-color: var(--color-tertiary);
}

.btn-brand--outline:hover {
  background: var(--color-tertiary);
  color: var(--color-primary) !important;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
}

.link-arrow i:last-child {
  font-size: 14px;
  transition: transform 0.3s;
}

.link-arrow:hover i:last-child {
  transform: translate(3px, -3px);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 18px;
}

/*--------------------------------------------------------------
# Shared card shell
--------------------------------------------------------------*/
.tile {
  position: relative;
  background: var(--color-primary);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.tile:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: var(--brand-glow);
}

/* Equal heights across a grid row. Only safe when the tile is its column's
   only child — a sibling heading makes 100% overflow the column. */
.tile--fill {
  height: 100%;
}

.medallion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 21px;
  color: var(--color-primary);
  background: var(--brand-gradient);
  border-radius: 50%;
  box-shadow: var(--brand-glow);
  transition: transform 0.4s ease;
}

.tile:hover .medallion {
  transform: rotate(-8deg) scale(1.06);
}

.medallion--square {
  border-radius: 13px;
}

/*--------------------------------------------------------------
# Chips
--------------------------------------------------------------*/
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--brand-deep);
  background: var(--brand-tint);
  border-radius: 50px;
  transition: 0.3s;
}

.chip:hover {
  background: var(--brand-tint-strong);
}

/*--------------------------------------------------------------
# Facts strip
--------------------------------------------------------------*/
.fact {
  overflow: hidden;
  padding: 26px 24px;
}

.fact::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--brand-tint);
}

.fact .medallion {
  margin-bottom: 16px;
}

.fact-num {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--color-tertiary);
}

.fact-label {
  position: relative;
  z-index: 1;
  margin: 9px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/*--------------------------------------------------------------
# Project cards
--------------------------------------------------------------*/
.pcard {
  overflow: hidden;
  padding: 32px 30px 28px;
}

/* Gradient rule that draws itself in on hover */
.pcard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.pcard:hover::before {
  transform: scaleX(1);
}

.pcard-index {
  position: absolute;
  top: 10px;
  right: 22px;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-tint);
  pointer-events: none;
  user-select: none;
}

.pcard-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 16px;
}

.pcard h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  text-align: left;
  color: var(--color-tertiary);
}

.pcard-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pcard-lead {
  color: var(--muted);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.metric {
  padding: 15px 17px;
  background: var(--brand-tint);
  border-radius: 10px;
}

.metric b {
  display: block;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-tertiary);
}

.metric span {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* Bullet list used inside the new cards */
.tick {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.tick li {
  position: relative;
  padding: 0 0 11px 26px;
  font-size: 15.5px;
  line-height: 1.6;
}

.tick li:last-child {
  padding-bottom: 0;
}

.tick li::before {
  content: "\F231";
  /* bi-chevron-right */
  position: absolute;
  left: 0;
  top: 1px;
  font-family: "bootstrap-icons";
  font-size: 13px;
  color: var(--color-tertiary);
}

/*--------------------------------------------------------------
# Skills
--------------------------------------------------------------*/
.skill-card {
  padding: 26px 24px;
}

.skill-card h3 {
  margin: 16px 0 14px;
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-tertiary);
}

/*--------------------------------------------------------------
# Publications
--------------------------------------------------------------*/
.pub {
  position: relative;
  padding: 0 0 30px 26px;
  border-left: 2px solid var(--color-tertiary);
}

.pub:last-child {
  padding-bottom: 0;
}

.pub::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--color-primary);
  border: 2px solid var(--color-tertiary);
  border-radius: 50px;
}

.ribbon {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 15px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--brand-gradient);
  border-radius: 4px;
}

.ribbon--quiet {
  color: var(--brand-deep);
  background: var(--brand-tint);
}

.pub h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  text-align: left;
  color: var(--color-text);
}

.pub p {
  margin: 0;
  color: var(--muted);
}

/*--------------------------------------------------------------
# Awards & talks
--------------------------------------------------------------*/
.award {
  display: flex;
  gap: 17px;
  padding: 24px;
}

.award h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  color: var(--color-tertiary);
}

.award p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

/*--------------------------------------------------------------
# Contact panel
--------------------------------------------------------------*/
.contact-panel {
  position: relative;
  overflow: hidden;
  padding: 46px;
  border-radius: 18px;
  background: var(--brand-gradient);
  color: var(--color-primary);
  box-shadow: var(--brand-glow);
}

.contact-panel::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.contact-panel>* {
  position: relative;
  z-index: 1;
}

.contact-panel h3 {
  margin: 0 0 10px;
  font-size: 27px;
  font-weight: 700;
  text-align: left;
  color: var(--color-primary);
}

.contact-panel p {
  color: rgba(255, 255, 255, 0.9);
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 15.5px;
}

.contact-list i {
  font-size: 18px;
  opacity: 0.9;
}

.contact-list a,
.contact-panel a {
  color: var(--color-primary);
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.btn-on-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 50px;
  background: var(--color-primary);
  color: var(--color-tertiary) !important;
  transition: 0.3s;
}

.btn-on-brand:hover {
  transform: translateY(-2px);
  color: var(--brand-deep) !important;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 991px) {
  .contact-panel {
    padding: 34px 26px;
  }

  .pcard-index {
    font-size: 52px;
  }
}

@media (max-width: 575px) {

  .pcard,
  .fact,
  .skill-card,
  .award {
    padding: 24px 20px;
  }

  .btn-brand,
  .btn-on-brand {
    width: 100%;
    justify-content: center;
  }
}

/*--------------------------------------------------------------
# Reduced motion
--------------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}
