/* Base Styles */
:root {
  --black: #000000;
  --white: #ffffff;
  --yellow: #ffd23f;
  --light-gray: #f5f5f5;
  --gray: #8E9196;
  --accent: #111111;
  --accent-2: #ffd23f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Fira Code', monospace;
  line-height: 1.6;
  color: var(--black);
  background-color: var(--white);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Utility Classes */
.desktop-only {
  display: none;
}

.mobile-only {
  display: block;
}

@media (min-width: 768px) {
  .desktop-only {
    display: block;
  }

  .mobile-only {
    display: none;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

/* Header & Navigation */
.header {
  padding: 1.5rem 0;
  padding-top: 0;
  background-color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  /* Create both horizontal and vertical fading using mask */
  -webkit-mask:
    linear-gradient(to bottom, black 0%, transparent 100%),
    linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-composite: intersect;
  mask:
    linear-gradient(to bottom, black 0%, transparent 100%),
    linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  mask-composite: intersect;
}

.header.scrolled::after {
  opacity: 1;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* margin-bottom: 1.5rem; */
}

.logo {
  font-size: 2rem;
  font-weight: 700;
}

.logo-text {
  text-decoration: none;
  color: var(--black);
  text-transform: uppercase;
  position: relative;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 0 0.5rem;
  /* keep width constant */
}

.logo-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--black);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: bottom left;
}

.logo-text:hover::after {
  transform: scaleX(1);
}

.logo-text:hover {
  background-color: var(--accent-2);
  color: var(--black);
  padding: 0 0.5rem;
}

.contact-info {
  text-align: right;
}

.contact-link {
  display: inline-block;
  background-color: var(--accent-2);
  color: var(--black);
  padding: 0.25rem 0.75rem;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background-color: var(--black);
  color: var(--accent-2);
}

.menu-toggle {
  background-color: var(--black);
  color: var(--accent-2);
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-border {
  border-top: 8px solid var(--black);
  /* border-bottom: 8px solid var(--black); */
  padding: 0.75rem 0;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-subtitle {
  font-size: 0.875rem;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  position: relative;
  padding: 0 0.5rem;
  /* keep width constant; hover won't grow */
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--black);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: bottom left;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link:hover {
  background-color: var(--accent-2);
  color: var(--black);
}

.nav-link.active {
  background-color: var(--accent-2);
  color: var(--black);
}

/* Mobile Menu */
.mobile-menu {
  border: 4px solid var(--black);
  margin-top: 1rem;
}

.mobile-menu-content {
  background-color: var(--accent-2);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.5rem;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  border: 2px solid var(--black);
  color: var(--black);
  transition: all 0.3s ease;
}

.mobile-nav-link.active {
  background-color: var(--black);
  color: var(--accent-2);
}

.mobile-contact-link {
  display: block;
  background-color: var(--black);
  color: var(--accent-2);
  padding: 0.5rem;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

/* Main Content */
.content {
  padding: 2rem 0;
}

/* Match top spacing under the header across pages
   Home should use the same smaller gap as subpages */
body.is-home .nav-border {
  padding: 0.75rem 0;
}

body.is-home .content {
  padding-top: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .grid {
    grid-template-columns: 2fr 1fr;
    align-items: stretch;
  }
}

/* Main Column */
.intro-box {
  border: 8px solid var(--black);
  padding: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
}

@media (min-width: 992px) {
  .intro-box {
    /* margin-bottom: 0; */
    /* height: 100%; */
  }
}

.title {
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .title {
    font-size: 3rem;
  }
}

.subtitle {
  font-size: 1.125rem;
}

.divider {
  border-top: 8px solid var(--black);
  margin-bottom: 2rem;
}

/* Content Blocks */
.content-blocks {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.yellow-box {
  background-color: var(--accent-2);
  padding: 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2rem;
  margin-top: 1rem;
  display: inline-block;
  border-bottom: 10px solid var(--accent-2);
  line-height: 0.75rem;
  padding-bottom: 10px;
  position: relative;
}


.section-title-link:hover {
  /* background-color: var(--accent-2); */
}

.section-title-link::after {
  content: '';
  position: absolute;
  bottom: -10px;
  /* position over the existing border */
  left: 0;
  width: 0;
  height: 10px;
  /* match the existing border thickness */
  background-color: var(--black);
  transition: width 0.3s ease;
}

.section-title-link:hover::after {
  width: 100%;
}

/* .section-title-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}  */
@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-text {
  font-size: 1rem;
}

.background-section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

/* Note meta bar under title */
.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 0.25rem;
  line-height: 1.5rem;
}

.badge {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  /* margin-right: 0.75rem; */
  position: relative;
}

/* Subtle separators between badges */
.badge:not(:last-child)::after {
  content: '•';
  /* position: absolute; */
  /* right: -0.5rem;  */
  color: var(--gray);
  font-weight: normal;
  margin-left: 0.5rem;
}

/* Different styling for each badge type */
.badge-award {
  /* font-weight: 700; */
  color: var(--black);
  /* background: var(--accent-2); */
  /* padding: 0.25rem 0.5rem; */
  /* border: 2px solid var(--black); */
}

.badge-venue {
  font-style: italic;
  color: var(--black);
}

.badge-year {
  font-weight: 600;
  color: var(--gray);
}

/* Option 1: Clean typography separation */
.note-authors-inline {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-style: italic;
  color: var(--gray);
  border-top: 2px solid var(--black);
  padding-top: 0.5rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Alternative Option 2: Subtle styling (comment out Option 1 and uncomment this)
.note-authors-inline {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  background: var(--light-gray);
  border-left: 4px solid var(--black);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}
*/

.header-line {
  width: 3rem;
  height: 0.25rem;
  background-color: var(--black);
  margin-right: 1rem;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

.column-title {
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.info-list {
  list-style: none;
}

.info-item {
  margin-bottom: 0.75rem;
}

.info-title {
  display: block;
  font-weight: 700;
}

/* Updates Section */
.section-divider {
  border-top: 8px solid var(--black);
  /* border-bottom: 8px solid var(--black); */
  padding: 1.5rem 0 0 0;
  margin-bottom: 0rem;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.update-card {
  border: 4px solid var(--black);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.update-card:hover {
  background-color: var(--accent-2);
}

.update-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.update-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.update-date {
  font-size: 0.875rem;
  border: 2px solid var(--black);
  padding: 0.25rem 0.5rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.projects-see-all { margin-top: 1rem; text-align: center; }
.projects-see-all .project-read-more {
  font-size: 1rem;
  padding: 0.25rem 0.75rem;
  border: 2px solid var(--black);
  border-radius: 4px;
  display: inline-block;
}
.projects-see-all .project-read-more:hover {
  padding: 0.25rem 0.75rem;
}
@media (min-width: 768px) {
  .projects-see-all { margin-top: 1.5rem; }
  .projects-see-all .project-read-more { font-size: 1.125rem; }
}

/* Pagination - mimic See all projects button */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.9rem; margin-top: 0; padding-top: 0; flex-wrap: wrap; }
.pagination-info { 
  font-size: 0.9rem; color: var(--gray); 
  /* margin-right: 0.5rem;  */
}
.pagination a,
.pagination .pagination-prev,
.pagination .pagination-next {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: 4px;
  width: 48px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.pagination a:hover { background-color: var(--accent-2); box-shadow: 0 1px 0 var(--black) inset; }
.pagination a.pagination-prev:hover { transform: translateX(-2px); }
.pagination a.pagination-next:hover { transform: translateX(2px); }

.pagination .is-disabled {
  color: var(--gray);
  border-color: var(--gray);
  opacity: 0.6;
  cursor: default;
}

/* Reset styling for the textual page info */
.pagination .pagination-info {
  border: 0;
  padding: 0;
  text-transform: none;
  font-weight: 400;
  width: 6rem;
}


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

/* Introduction content section */
.intro-content-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--light-gray);
  border: 4px solid var(--black);
}

.intro-content-section .text {
  max-width: none;
}

/* Full-width projects section on homepage */
.projects-full-width {
  margin-top: 1rem;
}

.projects-full-width .projects-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .projects-full-width .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .projects-full-width .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  border: 4px solid var(--black);
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--white);
}

.project-card:hover {
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.1);
  transform: translate(-5px, -5px);
}

.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.project-image {
  /* allow natural image aspect ratio; no cropping */
  height: auto;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: auto;
  transition: all 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-text {
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Sidebar tag list on notes page */
.notes-grid { align-items: flex-start; }
.notes-list { list-style: none; padding: 0; }
.notes-list .col-4 { --columns: 4; }
.notes .project-tags { gap: 0.5rem; }
.notes .project-tags .tag { text-decoration: none; display: inline-block; }
.notes-grid .side-col { position: sticky; top: 180px; align-self: start; }
.notes .project-tags .tag.active { background-color: var(--black); color: var(--white); }

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  /* background-color: var(--accent-2); */
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--black);
}
.tag.active {
  background-color: var(--accent-2);
}

/* Project Read More styling (exactly matching note cards) */
.project-read-more {
  margin-top: 1rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  position: relative;
  transition: all 0.3s ease;
  color: var(--black);
  width: fit-content;
}

.project-read-more::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--black);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: bottom left;
}

.project-read-more:hover::after {
  transform: scaleX(1);
}

.project-read-more:hover {
  background-color: var(--accent-2);
  color: var(--black);
  padding: 0 0.5rem;
}

.text a {
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
  position: relative;
  display: inline-block;
  padding: 0 0.25rem;
}

.text a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: var(--black);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: bottom left;
}

.text a:hover { background-color: var(--accent-2); color: var(--black); }
.text a:hover::after { transform: scaleX(1); }

::selection {
  background: var(--accent-2);
  color: var(--black);
}

/* Make selection visible on yellow badges */
/* .badge::selection, */
/* .badge *::selection, */
.note-authors-inline::selection,
.note-meta::selection {
  background: #0066cc;
  /* Blue background for visibility */
  color: white;
}

/* Option B: Card-based thumbnail layout for notes */
.note-card {
  border: 4px solid var(--black);
  padding: 1.5rem;
  margin-bottom: 0rem;
  transition: all 0.3s ease;
  background: var(--white);
  overflow: hidden;
}

.note-card:hover {
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.1);
}

.note-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.note-card-header {
  margin-bottom: 1rem;
}

.note-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.note-card-date {
  font-size: 0.875rem;
  color: var(--gray);
  /* background: var(--accent-2); */
  /* padding: 0.25rem 0.5rem; */
  /* border: 2px solid var(--black); */
  display: inline-block;
}

.note-card-content {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.note-card-text {
  flex: 1;
  line-height: 1.5;
}

.note-card-thumbnail {
  flex: 0 0 50%;
  max-width: 50%;
}

/* When no excerpt is shown (prev/next cards), make image full width */
.note-card-content.no-excerpt {
  display: block;
}
.note-card-content.no-excerpt .note-card-thumbnail {
  flex: none;
  max-width: 100%;
}
.note-card-content.no-excerpt .note-card-thumbnail .img {
  width: 100%;
}

.note-card-thumbnail .img {
  border: 1px solid var(--gray);
  overflow: hidden;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.note-card-thumbnail .img img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.3s ease;
}

.note-card:hover .note-card-thumbnail .img img {
  transform: none;
}

.note-card-read-more {
  margin-top: 1rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  position: relative;
  transition: all 0.3s ease;
  color: var(--black);
  width: fit-content;
  padding: 0 0.5rem;
  /* margin-left: -0.5rem; */
}

.note-card-read-more::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--black);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: bottom left;
}

.note-card-read-more:hover::after {
  transform: scaleX(1);
}

.note-card-read-more:hover {
  background-color: var(--accent-2);
  color: var(--black);
}

@media (max-width: 768px) {
  .note-card-content {
    flex-direction: column-reverse;
  }

  .note-card-thumbnail {
    width: 100%;
    max-width: 280px;
    align-self: center;
  }

  .note-card-title {
    font-size: 1.25rem;
  }
}



/* Publications Section */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.publication-card {
  border: 4px solid var(--black);
  padding: 1.5rem;
  background-color: var(--accent-2);
}

.publication-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.publication-venue {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.publication-link {
  display: inline-block;
  background-color: var(--black);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.publication-link:hover {
  background-color: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
}

/* Side Column */
.side-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-box {
  border: 8px solid var(--black);
  height: 300px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.profile-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.profile-placeholder {
  background-color: var(--light-gray);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-placeholder svg {
  width: 6rem;
  height: 6rem;
  color: var(--gray);
}

.research-areas-box,
.contact-box,
.featured-publication-box {
  border: 4px solid var(--black);
  padding: 1.5rem;
}

.featured-publication-box {
  background-color: var(--accent-2);
}

.box-title {
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.areas-list {
  list-style: none;
}

.area-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.area-bullet {
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--black);
  margin-right: 0.5rem;
}

.featured-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.featured-meta {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.featured-link {
  display: inline-block;
  background-color: var(--black);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.featured-link:hover {
  background-color: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
}

.contact-item {
  margin-bottom: 0.5rem;
}

.contact-label {
  font-weight: 700;
  margin-right: 0.25rem;
}

.contact-value {
  text-decoration: underline;
  color: inherit;
}

.contact-value:hover {
  color: var(--accent-2);
}

/* Footer */
.footer {
  background-color: var(--black);
  color: var(--white);
  padding: 1rem 0;
  margin-top: 2rem;
}

.footer::before {
  display: none;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  gap: 0.5rem;
}

.social-links {
  list-style: none;
  display: flex;
  gap: 0.9rem;
  margin: 0 auto;
  padding: 0;
  justify-content: center;
}

.social-links li {
  display: inline-flex;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  /* border: 2px solid var(--black); */
  /* border-radius: 6px; */
  /* color: var(--black); */
  /* text-decoration: none; */
  transition: transform .3s ease;
}

.social-link svg,
.social-link img {
  width: 20px;
  height: 20px;
  display: inline-block;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.3s ease-out;
  backface-visibility: hidden;
}

/* .social-link:hover { transform: translateY(-1px); } */
.social-link:hover svg,
.social-link:hover img { transform: scale(1.3); }

@media (2) {
  .social-link svg,
  .social-link img,
  .social-link:hover svg,
  .social-link:hover img { transition: none; transform: none; }
}

/* Footer social links should not get the external-link icon/padding */
.footer .social-link {
  background-image: none !important;
  padding-right: 0 !important;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    text-align: left;
  }
}

/* Site-wide link icons (external and PDF) */
/* Limit external icon treatment to body content links only */
.text a[target="_blank"],
.text a[href^="http://"],
.text a[href^="https://"] {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23000'><path d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3z'/><path d='M5 5h7v2H7v10h10v-5h2v7H5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 16px;
}

/* Exclude own domains/local from being marked as external */
.text a[href^="http://www.fbrudy.de"],
.text a[href^="http://fbrudy.de"],
.text a[href^="http://www.fbrudy.net"],
.text a[href^="https://www.fbrudy.net"],
.text a[href^="http://fbrudy.net"],
.text a[href^="https://fbrudy.net"],
.text a[href^="http://or.fbrudy.net"],
.text a[href^="http://localhost"],
.text a[href^="http://fbrudy.local"],
.text a[noexternal^="true"] {
  background-image: none;
  padding-right: 0;
}

/* Navigation links should never receive the external-link icon/padding */
.main-nav a.nav-link,
.mobile-menu a.mobile-nav-link {
  background-image: none !important;
  padding-right: 0.5rem !important;
  /* keep width consistent with base rule */
}

/* PDF icon (overrides external)
   and Kirby file route links (e.g., /@/file/<uuid>) -> show file icon */
a[href$=".pdf" i],
a[href*="/@/file"] {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23000'><path d='M6 2h7l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm7 1.5V8h4.5L13 3.5zM8 12h3a2 2 0 1 1 0 4H9v2H8v-6zm1 1v2h2a1 1 0 0 0 0-2H9zm6 0h2a2 2 0 1 1 0 4h-1v2h-1v-6zm1 1v2h1a1 1 0 1 0 0-2h-1zM8 10h6v1H8v-1z'></path></svg>");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 12px 12px;
  padding-right: 16px;
}