/* ===== Tokens ===== */
:root{
  --ink: #1A1A1A;
  --blue: #1E6FB8;
  --gray: #6B6B6B;
  --stone: #E5E2DC;
  --bg: #FFFFFF;
  --cp-green: #29523a;
  --cpp-green: #316248;
  --gmu-green: #32644f;
  --pcc-red: #BC4646;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Skip Navigation ===== */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 9999;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.skip-nav:focus {
  top: 0;
}

/* ===== Base / Reset ===== */
*{
  box-sizing: border-box;
}

html, body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

footer{
  text-align: center;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

/* ===== Default link style ===== */
a{
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ink);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

a:hover{
  text-decoration-color: var(--blue);
}

/* ===== Navigation: primary nav ===== */
.site-nav{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 3rem 6vw 0 6vw;
}

.site-nav .nav-list{
  display: flex;
  gap: 2.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav .nav-link{
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(66, 66, 66);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.35rem;
  white-space: nowrap;
  border-bottom: solid 2px rgb(182, 182, 182);
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active{
  color: var(--ink);
  border-bottom: solid 2px black;
}

.site-nav .nav-link.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--blue);
}

@media (max-width: 767.98px){
  .site-nav{
    padding: 3rem 7vw 0 7vw;
  }
  .site-nav .nav-list{
    gap: 1.1rem;
  }
  .site-nav .nav-link{
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 575.98px){
  .site-nav{
    justify-content: center;
  }
  .more-btn.more-btn-outline{
    padding: 0.5rem 0.9rem;
    font-size: 0.65rem;
  }
  .site-nav .nav-list{
    gap: 0.55rem;
    flex-wrap: nowrap;
    justify-content: center;
  }
  .site-nav .nav-link{
    font-size: 0.55rem;
    letter-spacing: 0.04em;
  }
  .site-nav .sub-link-list a{
    font-size: 0.53rem;
  }
}

.nav-home{
  display: flex;
  align-items: center;
  padding-bottom: 0;
  color: var(--gray);
}

.nav-home:hover{
  color: var(--ink);
}

.nav-home svg{
  display: block;
}

/* ===== Navigation: sub-nav (tabs for Research / Teaching) ===== */
.sub-nav-wrap{
  border-bottom: 1px solid var(--stone);
  background: var(--bg);
}

.sub-nav{
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0 auto;
  padding: 0 6vw;
  max-width: 1140px;
}

.sub-nav li{
  padding: 1.1rem 0;
}

.sub-nav a{
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.3rem;
}

.sub-nav a:hover{
  color: var(--ink);
}

.sub-nav a.active{
  color: var(--ink);
  font-weight: 600;
}

.sub-nav a.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.1rem;
  height: 2px;
  background: var(--blue);
}

@media (max-width: 575.98px){
  .sub-nav{
    gap: 1.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sub-nav li{
    flex: 0 0 auto;
  }
}

/* ===== Navigation: dropdown sub-links ===== */
.sub-link-list{
  list-style: none;
  margin: 0.35rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sub-link-list a{
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--gray);
  text-decoration: none;
  white-space: nowrap;
  display: block;
}

.sub-link-list a:hover{
  color: var(--blue);
}

/* ===== Page layout: sub-pages ===== */
.page-header{
  padding: 14vh 6vw 4vh 6vw;
  max-width: 1140px;
  margin: 0 auto;
}

.page-header h1{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--ink);
  margin: 0 0 0.6rem 0;
  text-transform: uppercase;
}

.page-header .page-kicker{
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 0.8rem;
}

.page-body{
  max-width: 1140px;
  margin: 0 auto;
  padding: 1vh 6vw 8vh 6vw;
}

.has-subnav .page-header{
  padding-top: 6vh;
}

/* ===== Hero ===== */
.hero{
  position: relative;
  height: 100vh;
  min-height: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* name rests on the "floor" of the viewport */
  background: var(--bg);
  overflow: hidden;
  border: solid 25px black;
}

.hero-inner{
  padding: 0 6vw 8vh 6vw;
}

.name-image{
  display: block;
  margin: 0;
  line-height: 0;
}

.name-image img{
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
}

.title-line{
  margin: 0.9rem 0 0 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--gray);
}

.title-line .highlight{
  color: var(--cp-green);
  font-weight: 600;
}

@media (max-width: 767.98px){
  .name-image img{
    max-width: 280px;
  }
  .title-line{
    font-size: 0.9rem;
  }
  .hero-inner{
    padding: 0 7vw 9vh 7vw;
  }
}

/* ===== Hero: scroll cue ===== */
.scroll-cue{
  position: absolute;
  left: 50%;
  bottom: 3vh;
  transform: translateX(-50%);
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

.scroll-cue svg{
  display: block;
}

@keyframes pulse{
  0%, 100% { opacity: 0.35; transform: translateX(-50%) translateY(0); }
  50%      { opacity: 1;    transform: translateX(-50%) translateY(4px); }
}

@media (prefers-reduced-motion: reduce){
  .scroll-cue::after{ animation: none; opacity: 1; top: 8px; }
}

/* ===== Content: typography basics ===== */
.content{
  background: var(--bg);
  padding-top: 7vh;
}

.cv-section{
  padding: 5.5vh 0;
}

.eyebrow{
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.bio-text{
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
}

.bio-text + .bio-text{
  margin-top: 1rem;
}

.section-divider{
  border: none;
  border-top: 1px solid var(--stone);
  margin: 0;
  max-width: none;
}

.section-heading{
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
}

.profile-subhead{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 2rem 0 1rem 0;
}

.gallery-subtitle{
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--gray);
  margin: 0 0 1.5rem 0;
}

/* ===== Shared: subtle stone→ink underline for inline links ===== */
.cv-list-title a,
.blog-post-breadcrumb a,
.profile-source-note a{
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--stone);
  text-decoration-thickness: 1px;
}

.cv-list-title a:hover,
.blog-post-breadcrumb a:hover,
.profile-source-note a:hover{
  text-decoration-color: var(--ink);
}

/* ===== Content: CV list ===== */
.cv-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-list li{
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--stone);
}

.cv-list li:first-child{
  padding-top: 0;
}

.cv-list li:last-child{
  border-bottom: none;
}

.cv-list-title{
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
}

.cv-list-meta{
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--gray);
  margin-top: 0.2rem;
}

.cv-list-num{
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--gray);
  margin-right: 0.5rem;
}


/* ===== Tags & pills ===== */
.tag-base{
  display: inline-flex;
  align-items: center;
  height: 25px;
  border: 1px solid var(--ink);
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 8px;
  cursor: default;
  box-sizing: border-box;
}

.hl-tag{
  color: var(--ink);
}
.hl-card-dark .hl-tag{
  border-color: #5F5E5A;
  color: #D3D1C7;
}

.hl-tag-award{
  gap: 5px;
  height: 22px;
  border-color: #BA7517;
  background: #FAEEDA;
  color: #633806;
}

.hl-card-dark .hl-tag-award{
  border-color: #EF9F27;
  background: #412402;
  color: #FAC775;
}

.hl-tag-school{
  gap: 6px;
  color: var(--ink);
  padding: 0 8px 0 5px;
}

.hl-tag-school img{
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.hl-card-dark .hl-tag-school{
  border-color: #5F5E5A;
  color: #D3D1C7;
}

.hl-tag-school-gmu{
  background-color: #32654f;
  border-color: #000000;
  color: #D3D1C7;
}

.hl-tag-school-gmu img{
  filter: none;
}

.hl-tag-school-cpp{
  background: #316248;
  border-color: #000000;
  color: #D3D1C7;
}

.hl-tag-school-calpoly-slo{
  background: #EAF3DE;
  border-color: #97C459;
  color: #3B6D11;
}

.hl-tag-school-pcc{
  background: #FAECE7;
  border-color: #F0997B;
  color: #993C1D;
}

/* ===== Highlight cards ===== */
.hl-card{
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 1.25rem;
  width: 100%;
}

.hl-card-light{
  background: var(--bg);
  border-width: 3px;
}

.hl-card-dark{
  background: var(--ink);
}

.hl-kicker{
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
  color: var(--blue);
}

.hl-kicker-research{
  color: var(--blue);
}
.hl-card-dark .hl-kicker-research{
  color: #7FB7EB;
}

.hl-kicker-teaching{
  color: #3B6D11;
}
.hl-card-dark .hl-kicker-teaching{
  color: #97C459;
}

.hl-kicker-projects{
  color: #B0590E;
}
.hl-card-dark .hl-kicker-projects{
  color: #F0997B;
}

.hl-kicker-press{
  color: #5A3E9E;
}
.hl-card-dark .hl-kicker-press{
  color: #AFA9EC;
}

.hl-kicker-creative{
  color: #8A6300;
}
.hl-card-dark .hl-kicker-creative{
  color: #EFC25C;
}

.hl-title{
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.6rem 0;
  color: var(--ink);
}

.hl-card-dark .hl-title{
  color: #fff;
}

@media (max-width: 767.98px){
  .hl-title{
    font-size: 1.05rem;
  }
}

.hl-authors{
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--gray);
  margin: 0 0 0.5rem 0;
}

.hl-card-dark .hl-authors,
.hl-card-dark .hl-body{
  color: #B4B2A9;
}

.hl-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.7rem;
}

.hl-body{
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--gray);
  margin: 0 0 1rem 0;
}

/* ===== Highlight cards: corner logo badge ===== */
.hl-card-has-logo{
  position: relative;
}

.hl-card-has-logo .hl-kicker,
.hl-card-has-logo .hl-title{
  padding-right: 28%;
}

.hl-card-logo-corner{
  position: absolute;
  top: 0;
  right: 0;
  width: 25%;
  aspect-ratio: 1 / 1;
  background: var(--stone);
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hl-card-logo-corner img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ===== Highlight cards: full-bleed image variant ===== */
.hl-card-image-wrap{
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background: var(--stone);
}

.hl-card-light .hl-card-image-wrap{
  border-bottom-width: 3px;
}

.hl-card-image{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===== Highlight cards: actions / buttons ===== */
.hl-actions{
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.hl-btn{
  flex: 1;
  display: inline-block;
  text-align: center;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.hl-btn:hover{
  background: var(--ink);
  color: var(--bg);
}

.hl-btn-filled{
  background: var(--ink);
  color: var(--bg);
}

.hl-btn-filled:hover{
  background: transparent;
  color: var(--ink);
}

.hl-card-dark .hl-btn{
  border-color: #fff;
  color: #fff;
}

.hl-card-dark .hl-btn:hover{
  background: #fff;
  color: var(--ink);
}

.hl-card-dark .hl-btn-filled{
  background: #fff;
  color: var(--ink);
}

.hl-card-dark .hl-btn-filled:hover{
  background: transparent;
  color: #fff;
}

/* ===== Overflow / "see more" buttons ===== */
.more-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.more-btn svg{
  flex-shrink: 0;
}

/* Option B: thick outline, matches hl-card-light border weight */
.more-btn-outline{
  border: 3px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

.more-btn-outline:hover{
  background: var(--ink);
  color: var(--bg);
}

/* Option C: filled black, matches hl-btn-filled */
.more-btn-filled{
  border: 1px solid var(--ink);
  color: var(--bg);
  background: var(--ink);
}

.more-btn-filled:hover{
  background: transparent;
  color: var(--ink);
}

.more-btn-row{
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.more-btn-icon{
  padding: 0.85rem;
  gap: 0;
}

/* ===== Research overflow page ===== */
.research-jump-wrap{
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
  background: var(--bg);
}

.research-jump{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  list-style: none;
  margin: 0 auto;
  padding: 1rem 6vw;
  max-width: 1140px;
}

.research-body{
  padding-top: 3vh;
}

.research-section{
  padding: 1rem 0 0.5rem 0;
}

/* ===== About Me ===== */
.about-photo{
  display: block;
  width: 100%;
  height: auto;
}

.about-wrap{
  overflow: hidden;
}

.about-photo-float{
  float: left;
  width: 180px;
  margin: 0 1.75rem 1rem 0;
  border: 3px solid var(--ink);
}

.about-clear{
  clear: both;
}

@media (max-width: 767.98px){
  .about-photo-float{
    float: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 1.5rem auto;
    border: 3px solid var(--ink);
  }
}

/* ===== Affiliations (current + past) ===== */
.affiliations-row{
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stone);
}

.affiliation-box{
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.affiliation-box-current{
  flex: 0 0 40%;
  border: 1px solid var(--ink);
  background-color: var(--cp-green);
}

.affiliation-box-past{
  flex: 1;
  border: 1px solid var(--stone);
}

.affiliation-box-label,
.affiliation-box-label-light{
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: block;
}

.affiliation-box-label{
  color: var(--gray);
}

.affiliation-box-label-light{
  color: rgba(255,255,255,0.85);
}

.affiliation-current-logo{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cp-green);
  padding: 1rem;
}

.affiliation-current-logo img{
  max-width: 220px;
  max-height: 150px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.affiliation-past-logos{
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: center;
}

.affiliation-past-logo-slot{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  height: 70px;
}

.affiliation-past-logo-slot-cpp{
  background: var(--cpp-green);
}

.affiliation-past-logo-slot-gmu{
  background: var(--gmu-green);
}

.affiliation-past-logo-slot-pcc{
  background: var(--pcc-red);
}

.affiliation-past-logos img{
  width: 100%;
  max-height: 100px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

@media (max-width: 767.98px){
  .affiliations-row{
    flex-direction: column;
  }

  .affiliation-box-current{
    flex: 1 1 auto;
  }

  .affiliation-past-logos{
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

/* ===== News feature (Press section) ===== */
.news-feature{
  display: flex;
  align-items: stretch;
  border: 3px solid var(--ink);
  margin-bottom: 0.75rem;
  min-height: 220px;
  box-sizing: border-box;
  position: relative;
}

.news-nav-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  background: var(--ink);
  border: none;
  border-right: 3px solid var(--ink);
  cursor: pointer;
  color: var(--bg);
  padding: 0;
  transition: background 0.1s, color 0.1s;
}

#newsNext{
  border-right: none;
  border-left: 3px solid var(--ink);
}

.news-nav-btn:hover{
  background: #444;
  color: var(--bg);
}

.news-feature-img-wrap{
  flex: 0 0 20%;
  overflow: hidden;
  display: block;
  align-self: stretch;
  border: 3px solid black;
}

.news-feature-img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.news-feature-body{
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-width: 0;
}

.news-feature-content{
  display: flex;
  flex: 1;
  min-width: 0;
  padding-left: 0.5rem;
}

@media (max-width: 767.98px){
  .news-feature-content{
    flex-direction: column;
  }

  .news-feature-img-wrap{
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
  }
}

/* ===== News feature: thumbnail row ===== */
.news-thumb-row{
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.news-thumb{
  flex: 0 0 150px;
  border: 1px solid var(--stone);
  background: var(--bg);
  cursor: pointer;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.news-thumb:hover{
  border-color: var(--gray);
}

.news-thumb.active{
  border-color: var(--ink);
}

.news-thumb-img-wrap{
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.news-thumb-img-wrap img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.news-thumb-title{
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray);
  padding: 0.5rem 0.6rem 0.2rem 0.6rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-thumb.active .news-thumb-title{
  color: var(--ink);
}

.news-thumb-date{
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--gray);
  padding: 0 0.6rem 0.6rem 0.6rem;
}

/* ===== Blog row list (homepage Notepad section + overflow page) ===== */
.blog-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 3px solid var(--ink);
}

.blog-row{
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 1rem;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  transition: background 0.15s ease;
}

.blog-row:hover{
  background: var(--stone);
}

.blog-row-img-wrap{
  flex: 0 0 90px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.blog-row-img-wrap img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-row-body{
  flex: 1;
  min-width: 0;
}

.blog-row-date{
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0 0 0.3rem 0;
}

.blog-row-title{
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.4rem 0;
}

.blog-row-desc{
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--gray);
  margin: 0;
  line-height: 1.5;
}

.blog-row-arrow{
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--ink);
}

@media (max-width: 575.98px){
  .blog-row{
    align-items: flex-start;
  }
  .blog-row-img-wrap{
    flex: 0 0 64px;
  }
}

/* ===== Photo gallery / Lightbox ===== */
.photo-gallery-frame{
  padding: 8px;
}

.photo-gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-tile{
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 3px solid var(--ink);
}

.photo-tile img,
.photo-tile-clean img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-tile:hover img{
  filter: grayscale(40%);
  transition: filter 0.25s ease;
}

.photo-tile-clean{
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.gallery-credit{
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--gray);
  margin: 1.25rem 0 0 0;
  text-align: center;
}

@media (max-width: 767.98px){
  .photo-gallery-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

.lightbox3-overlay{
  --lb-backdrop-color: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ===== Student profile page ===== */
.profile-source-note{
  max-width: 1140px;
  margin: 0 auto 2.5rem auto;
  padding: 1rem 1.25rem;
  border: 1px solid var(--stone);
  border-left: 3px solid var(--ink);
  background: var(--bg);
}

.profile-source-note p{
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
  margin: 0 0 0.5rem 0;
}

.profile-source-note p:last-child{
  margin-bottom: 0;
}


.profile-header{
  display: flex;
  gap: 2rem;
  border: 1px solid var(--stone);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

.profile-header-photo{
  flex: 0 0 180px;
}

.profile-header-photo img{
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--ink);
}

.profile-header-body{
  flex: 1;
  min-width: 0;
}

.profile-name{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--ink);
  margin: 0 0 0.75rem 0;
}

.profile-fact{
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  margin: 0 0 0.4rem 0;
  line-height: 1.5;
}

.profile-fact-label{
  font-weight: 600;
}

.profile-quote{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--gray);
  margin: 1rem 0 0 0;
  line-height: 1.5;
}

.profile-body{
  width: 100%;
}

@media (max-width: 767.98px){
  .profile-header{
    flex-direction: column;
  }

  .profile-header-photo{
    flex: 0 0 auto;
    max-width: 160px;
  }

  .profile-name{
    font-size: 1.5rem;
  }
}

/* ===== Blog post page ===== */
.blog-post-breadcrumb{
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 1.5rem;
}

.blog-post-breadcrumb a{
  font-weight: 600;
}

.blog-post-header{
  display: flex;
  gap: 2rem;
  border: 3px solid black;
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  align-items: center;
}

.blog-post-header-text{
  flex: 1;
  min-width: 0;
}

.blog-post-title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  color: var(--ink);
  margin: 0.3rem 0 0.5rem 0;
}

.blog-post-dek{
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gray);
  margin: 0 0 1rem 0;
}

.blog-post-header-img{
  flex: 0 0 220px;
}

.blog-post-header-img img{
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--ink);
}

.blog-post-body{
  margin-bottom: 2.5rem;
}

.blog-post-lead{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
}

@media (max-width: 767.98px){
  .blog-post-header{
    flex-direction: column;
  }

  .blog-post-header-img{
    flex: 0 0 auto;
    max-width: 200px;
  }

  .blog-post-title{
    font-size: 1.5rem;
  }
}

/* ===== Blog post page: galleries & figures ===== */
.blog-post-gallery-grid{
  grid-template-columns: repeat(3, 1fr);
}

.blog-post-gallery-wide{
  grid-column: span 3;
  aspect-ratio: 16 / 7;
}

@media (max-width: 767.98px){
  .blog-post-gallery-grid{
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-post-gallery-wide{
    grid-column: span 2;
  }
}

.blog-post-figure{
  margin: 1.5rem 0 2rem 0;
  max-width: 100%;
}

.blog-post-figure-tile{
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.blog-post-figure-tile img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.blog-post-figure-small{
  max-width: 280px;
}

.blog-post-figure-medium{
  max-width: 520px;
  margin: 0 auto;
}

.blog-post-caption{
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--gray);
  margin-top: 0.6rem;
  line-height: 1.5;
}

.blog-post-closing-img{
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* ===== Project detail page: layout + TOC ===== */
.project-layout{
  max-width: 1240px;
}

.project-toc-col{
  padding-top: 2vh;
}

.project-toc{
  position: sticky;
  top: 90px;
  border-left: 2px solid var(--stone);
  padding-left: 1.25rem;
}

.project-toc-label{
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.9rem;
}

.project-toc-list,
.project-toc-sublist{
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-toc-list > li{
  margin-bottom: 0.7rem;
}

.project-toc-list a{
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray);
  text-decoration: none;
  line-height: 1.4;
}

.project-toc-list a:hover{
  color: var(--ink);
}

.project-toc-sublist{
  margin-top: 0.5rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--stone);
}

.project-toc-sublist li{
  margin-bottom: 0.5rem;
}

.project-toc-sublist a{
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--gray);
}

.project-toc-sublist a:hover{
  color: var(--ink);
}

@media (max-width: 991.98px){
  .project-toc{
    position: static;
    border-left: none;
    border-bottom: 1px solid var(--stone);
    padding-left: 0;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
  }
}

/* ===== Project detail page: body content ===== */
.project-body{
  padding: 2vh 2vh 8vh 2vh;
}

.project-h2{
  margin-top: 0;
  scroll-margin-top: 90px;
}

.project-h3{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 2rem 0 1rem 0;
  scroll-margin-top: 90px;
}

.project-list{
  margin: 0 0 1.25rem 0;
  padding-left: 1.4rem;
}

.project-list li{
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.project-subreddit-list{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0 1.5rem 0;
}

.project-overall-statement{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  text-align: center;
  color: var(--ink);
  margin: 1.5rem 0 1.5rem 0;
}

/* ===== Project detail page: data cards ===== */
.project-data-heading{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-align: center;
  margin: 2rem 0 1.25rem 0;
}

.project-data-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}

.project-data-card{
  border: 1px solid var(--stone);
  padding: 1rem;
}

.project-data-card-title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 0.6rem 0;
}

.project-data-card-stats{
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-data-card-stats li{
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.76rem;
  color: var(--gray);
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--stone);
}

.project-data-card-stats li:last-child{
  border-bottom: none;
}

.project-data-card-stats li span:last-child{
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 767.98px){
  .project-data-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px){
  .project-data-grid{
    grid-template-columns: 1fr;
  }
}

/* ===== Project detail page: images ===== */
.project-image-pair{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 1.5rem 0;
}

@media (max-width: 767.98px){
  .project-image-pair{
    grid-template-columns: 1fr;
  }
}

/* ===== Project detail page: infographic rows ===== */
.project-infographic-row{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 1.5rem 0;
}

.project-infographic-row-single{
  grid-template-columns: 2fr 1fr;
}

.project-infographic-text{
  grid-column: span 1;
}

.project-infographic-row .photo-tile-clean{
  aspect-ratio: 3 / 4;
}

@media (max-width: 991.98px){
  .project-infographic-row{
    grid-template-columns: 1fr 1fr;
  }
  .project-infographic-row-single{
    grid-template-columns: 1fr;
  }
}

/* ===== Profile links ===== */
.profile-links{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 1rem 0 1.25rem;
}

.profile-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 3px solid var(--ink);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  background: var(--bg);
  transition: background 0.1s, color 0.1s;
}

.profile-link svg{
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.profile-link:hover{
  background: var(--ink);
  color: var(--bg);
}
