:root {
  --site-ink: #11263c;
  --site-paper: #f7f9fc;
  --site-accent: #0f4c81;
  --site-accent-soft: #d8e8f8;
  --bd-green: #006a4e;
  --bd-red: #f42a41;
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--site-ink);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

#site-footer {
  margin-top: auto;
}

p {
  text-align: justify;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Source Serif 4", serif;
  color: var(--site-ink);
}

.hero {
  background:
    radial-gradient(circle at 90% 10%, #eaf3ff 0%, transparent 40%),
    radial-gradient(circle at 10% 90%, #edf6ff 0%, transparent 35%),
    #ffffff;
}

.page-hero {
  background:
    radial-gradient(circle at 92% 18%, #edf5ff 0%, transparent 30%),
    #ffffff;
  border-bottom: 1px solid #e8eef7;
}

.py-lg-6 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.letter {
  letter-spacing: 0.08em;
}

.section-title {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
}

.section-alt {
  background: var(--site-paper);
}

.soft-box {
  background: #ffffff;
  border: 1px solid #e5edf7;
  border-radius: 0.8rem;
}

.hero .row {
  align-items: stretch !important;
}

.hero .row > .col-md-4 {
  display: flex;
  align-self: stretch;
}

.profile-card {
  background: #ffffff;
  border: 1px solid #e5edf7;
  border-radius: 0.9rem;
  padding: 0.6rem;
  box-shadow: 0 12px 24px rgba(21, 48, 79, 0.08);
  display: flex;
  align-items: stretch;
  width: 100%;
  flex: 1;
  height: 100%;
}

.profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--bd-red);
  border-radius: 0.65rem;
  box-shadow: 0 0 0 4px var(--bd-green);
}

@media (max-width: 991px) and (min-width: 768px) {
  .hero .row > .col-md-4 {
    display: block;
    align-self: auto;
  }

  .profile-card {
    display: block;
    height: auto;
  }

  .profile-photo {
    height: auto;
    object-fit: contain;
    transform: none;
  }
}

@media (max-width: 767px) {
  .profile-photo {
    height: auto;
    transform: none;
  }
}

.intro-meta-card p {
  text-align: left;
}

.interest-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f4c81;
  background: #e7f0fb;
  border: 1px solid #d3e4f8;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

.publication-list li {
  margin-bottom: 0.85rem;
  line-height: 1.55;
}

.news-box {
  max-height: 22rem;
  overflow: auto;
}

.news-list li {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0.9rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #edf2f8;
}

.news-list li:last-child {
  border-bottom: 0;
}

.news-date {
  font-weight: 600;
  color: #4a617a;
  white-space: nowrap;
}

.repo-card {
  background: #ffffff;
  border: 1px solid #dfe9f6;
  border-radius: 0.9rem;
  box-shadow: 0 10px 20px rgba(17, 38, 60, 0.06);
}

.repo-card p {
  text-align: left;
}

.repo-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f4c81;
  background: #e7f0fb;
  border: 1px solid #d3e4f8;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.gallery-card {
  background: #ffffff;
  border: 1px solid #dfe9f6;
  border-radius: 0.9rem;
  box-shadow: 0 10px 20px rgba(17, 38, 60, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(17, 38, 60, 0.12);
}

.gallery-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.gallery-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f4c81;
  background: #e7f0fb;
  border: 1px solid #d3e4f8;
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
}

.md-section-content p {
  margin-bottom: 0.8rem;
}

.md-section-content ul,
.md-section-content ol {
  padding-left: 1.2rem;
}

.md-section-content li {
  margin-bottom: 0.55rem;
}

.md-section-content h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  margin-top: 0.85rem;
  margin-bottom: 0.45rem;
  color: var(--site-ink);
}

.resume-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.4rem;
}

.resume-info-col p {
  margin-bottom: 0.5rem;
}

@media (max-width: 767.98px) {
  .resume-info-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

@media (max-width: 575.98px) {
  .news-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .profile-photo {
    max-height: 340px;
  }
}

a {
  color: var(--site-accent);
}

a:hover {
  color: #0a3c66;
}

.navbar .nav-link.active {
  color: #07345a;
  font-weight: 600;
}

.btn-primary {
  background-color: var(--site-accent);
  border-color: var(--site-accent);
}

.btn-primary:hover {
  background-color: #0a3c66;
  border-color: #0a3c66;
}

.btn-outline-primary {
  color: var(--site-accent);
  border-color: var(--site-accent);
}

.btn-outline-primary:hover {
  background-color: var(--site-accent-soft);
  color: #07345a;
  border-color: var(--site-accent);
}
