/* =============================================
   Version 1.1 — CSS Custom Properties
   ============================================= */
:root {
  --primary:        #01579B;
  --primary-light:  #039BE5;
  --primary-dark:   #004785;
  --accent:         #0288D1;
  --secondary:      #2f6f5e;
  --warm:           #9a5a2f;
  --text-dark:      #2c3e50;
  --text-muted:     #6b6b6b;
  --bg-light:       #f6f8fb;
  --bg-white:       #fbfcfe;
  --surface-soft:   #eef4f8;
  --border-soft:    #d9e4ee;
  --border-radius-sm: 4px;
  --border-radius:    8px;
  --border-radius-lg: 14px;
  --shadow-sm:  0 2px 6px rgba(0,0,0,0.07);
  --shadow:     0 4px 14px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 28px rgba(0,0,0,0.13);
  --transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  --font-size-content: 17px;
  --font-size-card: 15px;
  --font-size-compact: 15px;
  --font-size-meta: 14px;
  --line-height-content: 1.65;
  --line-height-card: 1.58;
  --line-height-meta: 1.45;
}

/* =============================================
   Main page with sticky-footer
   ============================================= */
html {
  scroll-behavior: smooth;
}
html,
body {
  height: 100%;
  background-color: #f7f9fc;
  font-family: 'Atkinson Hyperlegible', 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  border-top: 3px solid var(--primary);
  color: var(--text-dark);
}
/* Wrapper for page content to push down footer */
#wrap {
  padding-bottom: 50px;	
  min-height: 100%;
  height: auto;
  /* Negative indent footer by its height */
  margin: 0 auto -65px;
  /* Pad bottom by footer height */
  /*padding: 0 0 60px;*/
}
.justify {
  text-align: justify;
  text-justify: inter-word;
}
.div-justify {
  text-align: left;
  text-indent: 0;
  text-justify: inter-word;
  padding-bottom: 10px;
}
.div-justify-pub {
  text-align: left;
  text-justify: inter-word;
  padding-bottom: 10px;
}
/* Navbar
-------------------------------------------------- */

.navbar-static-top {
  margin-bottom: 10px;
}
.navbar-default {
  background-color: #ffffff;
  border-color: #ffffff;
}
.navbar-default .navbar-brand {
  color: #6b6b6b;
}
.navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus {
  color: #6b6b6b;
}
.navbar-default .navbar-text {
  color: #6b6b6b;
}
.navbar-default .navbar-nav > li > a {
  color: #6b6b6b;
  
}

.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
  color: #6b6b6b;
}
.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
  color: #6b6b6b;
  background-color: #ffffff;
}
.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus {
  color: #6b6b6b;
  background-color: #ffffff;
}
.navbar-default .navbar-toggle {
  border-color: #ffffff;
}
.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
  background-color: #ffffff;
}
.navbar-default .navbar-toggle .icon-bar {
  background-color: #6b6b6b;
}
.navbar-default .navbar-collapse,
.navbar-default .navbar-form {
  border-color: #6b6b6b;
}
.navbar-default .navbar-link {
  color: #6b6b6b;
}
.navbar-default .navbar-link:hover {
  color: #6b6b6b;
}
@media (max-width: 767px) {
  .navbar-default .navbar-nav .open .dropdown-menu > li > a {
    color: #6b6b6b;
  }
  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
    color: #6b6b6b;
  }
  .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
    color: #6b6b6b;
    background-color: #ffffff;
  }
}

/* Custom page CSS
-------------------------------------------------- */

.container {
  width: auto;
  max-width: 1040px;
  text-align: left;
}
.container .text-muted {
  margin: 20px 0;
}
.container a {
  color: #01579B;
}
.container a:hover {
  color: #039BE5;
}
.img-responsive {
 display: block;
 height: auto;
 max-width: 100%;
}
.panel-default h4 {
  text-align: left;
  line-height: 24px;
  font-size: 22px;
}
.panel-default h5 {
  text-align: left;
  line-height: 30px;
  font-size: 18px;
}
.panel-default h6 {
  font-size: 15px;
}
.panel-default h4 a, h5 a {
  color: #01579B;
}
.panel-default h4 a:hover, h5 a:hover {
  color: #039BE5;
}
.panel {
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
  margin-bottom: 16px;
}
.panel-body {
  padding: 12px 16px;
  text-align: left;
  line-height: 30px;
  font-size: 18px;
}
.social {
  padding-top: 12px;
  word-spacing: 25px;
}
.footer-line{
  clear:both;margin-top:-20px;
  font-size: 16px;
}
.footer-line div.left{
  float:left;
}
.footer-line div.right{
  float:right;
}
.panel-default h5.icon-bar, h5.icon-bar  {
  text-align: center;
  line-height: 30px;
  font-size: 18px;
}
.social h4 > a {
  color: #000000;
}
.social h5 > a {
  color: #666;
}
.avatar {
  padding-top: 5%;
}
.blog-post{
  padding-top: 15px;
}
.blog-title{
  padding-top: 2px;
}
.related-posts h4 {
  text-align: center;
}
.page-not-found {
  padding-top: 20%;
}
.disqus {
  padding-bottom: 15px;
}

.blogpost{
  text-align: left;
  line-height: 30px;
  font-size: 18px;
}

/* Footer 
-------------------------------------------------- */

.footer {
  text-decoration: none !important;

}
.text-muted {
	color: #6b6b6b;
}
div.footer{
  border-bottom: 5px solid #01579B;;
}
/* Set the fixed height of the footer here */
/*.footer {
  height: 50px;
  padding-bottom: 15px;
  
}*/


.carousel {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

ul.slides {
  display: block;
  position: relative;
  width: 100%;
  max-width: 930px;
  aspect-ratio: 6 / 3; /* Maintains consistent box ratio */
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slides * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
}

ul.slides input {
  display: none;
}

.slide-container {
  display: block;
}

.slide-image {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
}

.slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Show active slide */
#img-1:checked ~ .slide-container:nth-of-type(2),
#img-2:checked ~ .slide-container:nth-of-type(4),
#img-3:checked ~ .slide-container:nth-of-type(6) {
  z-index: 1;
  opacity: 1;
}

/* Carousel controls */
.carousel-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  font-size: 3.5rem;
  line-height: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  color: #fff;
  pointer-events: none; /* avoid click-through */
}

.carousel-controls label {
  display: block;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  cursor: pointer;
  pointer-events: auto;
}

.carousel-controls label:hover {
  opacity: 1;
}

/* Dots */
.carousel-dots {
  text-align: center;
  margin-top: 10px;
}

.carousel-dot {
  display: inline-block;
  height: 10px;
  width: 10px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
}

#img-1:checked ~ .carousel-dots label:nth-of-type(1),
#img-2:checked ~ .carousel-dots label:nth-of-type(2),
#img-3:checked ~ .carousel-dots label:nth-of-type(3) {
  background-color: #007bff;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  ul.slides {
    max-width: 100%;
    aspect-ratio: 6 / 3;
  }

  .carousel-controls {
    font-size: 3.5rem;
  }
}
.slide-image:hover + .carousel-controls label{
  opacity: 0.5;
}

.carousel-controls label:hover {
  opacity: 1;
}

.carousel-controls .prev-slide {
  width: 49%;
  text-align: left;
  left: 0;
}

.carousel-controls .next-slide {
  width: 49%;
  text-align: right;
  right: 0;
}

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  z-index: 999;
  text-align: center;
}

.carousel-dots .carousel-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #fff;
  opacity: 0.5;
  margin: 5px;
}

input:checked + .slide-container .slide-image {
  opacity: 1;
  transform: scale(1);
  transition: opacity 1s ease-in-out;
}

input:checked + .slide-container .carousel-controls label {
   display: block; 
}

input#img-1:checked ~ .carousel-dots label#img-dot-1,
input#img-2:checked ~ .carousel-dots label#img-dot-2,
input#img-3:checked ~ .carousel-dots label#img-dot-3,
input#img-4:checked ~ .carousel-dots label#img-dot-4,
input#img-5:checked ~ .carousel-dots label#img-dot-5,
input#img-6:checked ~ .carousel-dots label#img-dot-6 {
opacity: 1;
}


input:checked + .slide-container .nav label { display: block; }

.navbar-default .navbar-nav > li > a,
  .navbar-default .navbar-brand.custom-brand {
    font-size: 14px; /* adjust if your nav links are a different size */
    font-weight: normal;
    padding-top: 15px;
    padding-bottom: 15px;
    line-height: 20px;
  }

  .navbar-brand.custom-brand {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .navbar-brand.custom-brand .brand-name {
    white-space: nowrap;
  }

  .navbar-brand.custom-brand i {
    font-size: 14px; /* match icon size to text */
  }


    .navbar-nav > li.active > a {
    background-color: #01579B;
    color: #2c3e50 !important;
    font-weight: 600;
    border-radius: 4px;
  }

  .navbar-nav > li > a:hover {
    background-color: #e9f0ff;
    color: #01579B !important;
  }

  .section-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2c3e50;
  }
  
  .card-supervision {
    background: #f9f9f9;
    border-left: 4px solid #007bff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
  }
  
  .card-supervision h5 {
    margin-bottom: 8px;
    color: #007bff;
    font-weight: 600;
  }
  
  .card-supervision ul {
    padding-left: 20px;
    margin-bottom: 0;
  }
  
  .card-supervision li {
    margin-bottom: 6px;
  }
  
  .list-decorated li {
    margin-bottom: 6px;
    padding-left: 1rem;
    position: relative;
  }
  
  .list-decorated li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #007bff;
  }

  .section-header {
    background-color: #f8f9fa;
    border-left: 5px solid #01579B;
    padding: 10px 10px;
    margin: 0px 0 15px;
    font-size: 1.8rem;
    font-weight: 550;
    color: #343a40;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /*  important for mobile */
  }

  .badge-primary {
    background-color:  #01579B;
    font-size: 1.2rem;
    padding: 5px 5px;
    border-radius: 4px;
    color: #fff;
    white-space: nowrap;
    margin-left: auto;  /* ✅ pushes it to the right even when wrapped */
  }

  .div-justify-pub .icon {
    margin-top: 2px;
    flex-shrink: 0;
    color: #01579B;
  }
  
  .div-justify-pub .text {
    flex: 1;
  }

  .publication-entry {
    
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    text-align: justify;
    
    margin-top: 30px;
    margin-bottom: 12px;
  }
  
  .publication-entry i {
    margin-right: 8px;
    color: #01579B;
  }

  .div-justify-pub {
    text-align: justify;
  }

  .div-justify-pub i {
    color: #01579B;
  }

  .div-justify-pub a {
    text-decoration: none;
  }

  .div-justify-pub a:hover {
    text-decoration: underline;
  }

  .supervision-entry {
    text-align: left;
    margin-top: 20px;
    clear: both;
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: var(--border-radius);
    padding: 14px 16px;
  }
  
  .supervision-entry p {
    font-size: 18px;
    line-height: 1.6;
  }
  
  .supervision-topic {
    padding-top: 0;
    margin-top: 0;
  }
  .supervision-topic em {
    color: #333;
  }
  
  .supervision-students a {
    color: #01579B;
    text-decoration: none;
  }
  
  .supervision-students a:hover {
    text-decoration: underline;
  }
  
  hr {
    border-top: 1px solid #ccc;
    margin: 20px 0;
  }
  
  .service-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: left;
  }
  
  .service-subtitle {
    position: relative;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    padding-left: 28px;
    margin-top: 30px;
    margin-bottom: 12px;
  }
  
  .service-subtitle i {
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 16px;
    color: #01579B;
  }
  
  @media (max-width: 576px) {
    .service-subtitle {
      font-size: 16px;
      padding-left: 24px;
    }
  
    .service-subtitle i {
      font-size: 14px;
    }
  }

  .service-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 20px;
  }
  
  .service-list li {
    font-size: 18px;
    line-height: 30px;
    margin-bottom: 6px;
    text-align: justify;
  }

  .teaching-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
  }

  .teaching-card {
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 16px;
  }

  .teaching-card-header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
  }

  .teaching-icon {
    align-items: center;
    background: #e8f3fb;
    border: 1px solid #cfe5f4;
    border-radius: 8px;
    color: #01579B;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
  }

  .teaching-icon i {
    font-size: 18px;
  }

  .teaching-card h3 {
    color: #20394d;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
  }

  .teaching-card p {
    color: #4d6375;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
  }

  @media (max-width: 768px) {
    .teaching-grid {
      grid-template-columns: 1fr;
    }
  }


  .section-title {
    font-size: 22px;
    font-weight: 550;
    text-align: center;
    margin: 0px 0 50px;
    position: relative;
    display: inline-block;
  }
  
  .section-title i {
    margin-right: 5px;
    vertical-align: middle;
    font-size: 20px;
  }
  
  .section-title::after {
    content: '';
    display: block;
    height: 3px;
    background-color: #2c3e50;
    margin: 5px auto 0;
    border-radius: 4px;
  }

  .supervision-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    align-items: flex-start;
    gap: 4px 16px;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 5px;
  }

  .meta-left {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  
  .meta-left i {
    margin-right: 8px;
    color: #01579B;
  }
  
  .meta-right {
    font-style: italic;
    color: #555;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    justify-self: end;
    text-align: right;
    white-space: normal;
  }

  .meta-right small {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .email-icon {
    margin-left: 8px;
    color: #01579B;
    text-decoration: none;
  }
  
  .email-icon:hover {
    color: #01579B;
  }

  .supervision-topic {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    column-gap: 12px;
    align-items: baseline;
    color: #4d6375;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 5px;
  }
  
  .supervision-label {
    color: #20394d;
    font-weight: 700;
    white-space: nowrap;
  }

  .supervision-label::after {
    content: ":";
  }

  .supervision-value {
    color: #344b5e;
    min-width: 0;
  }

  .supervision-value em,
  .supervision-value .student-name {
    color: #20394d;
    font-style: normal;
    font-weight: 600;
    text-decoration: none;
  }

  .supervision-value a.student-name:hover,
  .supervision-value a.student-name:focus {
    color: var(--primary);
    text-decoration: underline;
  }

  @media (max-width: 768px) {
    .supervision-meta {
      align-items: flex-start;
      grid-template-columns: 1fr;
      gap: 0;
      line-height: 1.35;
    }

    .meta-left,
    .meta-right {
      display: block;
      flex: none;
      flex-basis: auto;
      line-height: 1.35;
      min-height: 0;
      width: 100%;
    }

    .meta-right {
      justify-self: start;
      text-align: left;
    }

    .meta-right small {
      display: block;
      margin-top: 2px;
    }
  }

  @media (max-width: 576px) {
    .supervision-topic {
      grid-template-columns: 1fr;
      row-gap: 2px;
    }

    .supervision-label,
    .supervision-value {
      grid-column: 1;
    }
  }

  .awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
  }
  
  .awards-grid article {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
  }
  
  .awards-grid h1 {
    font-size: 20px;
    color: #01579B;
    margin-bottom: 5px;
  }
  
  .awards-grid p {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
  }

  .interest-tags {
    margin-top: 20px;
  }
  
  .tag {
    display: inline-block;
    background-color: #e9f0ff;
    color: #01579B;
    padding: 6px 12px;
    margin: 5px 6px 0 0;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 500;
    transition: background 0.3s ease;
  }
  
  .tag:hover {
    background-color: #d0e6ff;
  }

  .language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
  }
  
  .language-item {
    line-height: 20px;
    border-radius: 4px;
    padding: 12px 16px;
    background-color: #f9f9f9;
    margin-top:5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .language-item h5 {
    font-size: 18px;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    transition: background 0.3s ease;
    gap: 6px;
  }
  
  .badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    display: inline-block;
    transition: background 0.3s ease;
  }
  
  .badge-fluent {
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 500;
    line-height: 20px;
    background-color: #e0f0ff;
    color: #01579B;
  }
  
  .badge-native {
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 18px;
    line-height: 20px;
    font-weight: 500;
    background-color: #e0ffe7;
    color: #28a745;
  }
  .badge-fluent:hover {
    background-color: #d0e6ff;
  }
  .badge-native:hover {
    background-color: #bbffc3;
  }



.skills-grid {
    margin-top:20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .skill-block {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
  }
  .skill-block i {
    color: #666;
  }
  
  .skill-block h5 {
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .skill-tag {
    display: inline-block;
    background-color: #e7f1ff;
    color: #01579B;
    padding: 4px 6px;
    margin: 4px 5px 0 0;
    font-size: 16px;
    border-radius: 4px;
    font-weight: 500;
    line-height: 20px;
  }
  .skill-tag:hover {
    background-color: #d0e6ff;
  }


  .education-card {
    background: #f9f9f9;
    color: #666;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    line-height: 28px;
  }
  
  .edu-header h4 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  .education-card em{
    color: #666;
    font-size: 18px;
  }
  .edu-meta {
    font-size: 14px;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 6px;
  }
  
  .edu-note {
    font-size: 16px;
    color: #666;
    display: block;
    margin-top: 4px;
    padding: 8px 0px;
  }
  
  .education-card p {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
  }
  

  .experience-card {
    background: #f9f9f9;
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
  }
  
  .experience-header {
    margin-bottom: 8px;
  }
  
  .experience-header h4 {
    margin: 0;
    font-size: 18px;
  }
  

  .experience-meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    margin: 4px 0;
  }
  
  .left-meta {
    justify-self: start;
  }
  
  .center-meta {
    text-align: center;
    font-weight: 500;
    color: #666;
  }
  
  .right-meta {
    justify-self: end;
  }
  
  @media (max-width: 576px) {
    .experience-meta {
      grid-template-columns: 1fr;
      text-align: left;
      gap: 4px;
    }
  
    .center-meta {
      text-align: left;
    }
  
    .right-meta {
      justify-self: start;
    }
  }
  
  .experience-card p {
    font-size: 16px;
    text-align: justify;
    margin-top: 10px;
    line-height: 1.6;
  }

  .tag {
    display: inline-block;
    background-color: #e7f1ff;
    font-size: 16px;
    color: #01579B;
    padding: 1px 6px;
    margin: 1px 2px;
    border-radius: 2px;
  }


  .profile-left {
    background: #fff;
    padding: 25px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    max-width: 280px;
    margin: 0 auto;
  }
  
  .profile-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 2px solid #01579B;
  }
  
  .profile-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
  }
  
  .profile-contact,
  .profile-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    text-align: left;
  }
  
  .profile-contact a,
  .profile-social a {
    
    color: #333;
    text-decoration: none;
    padding-left: 8px;
    position: relative;
    transition: all 0.2s ease;
  }
  
  .profile-contact a i,
  .profile-social a i {
    color: #01579B;
    margin-right: 8px;
    position: absolute;
    left: 0;
    top: 2px;
  }
  
  .profile-contact a:hover,
  .profile-social a:hover {
    color: #01579B;
  }

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #333;
}
 
a.link-block {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-soft);
  padding: 10px 12px;
  border-radius: var(--border-radius);
  margin: 0;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  transition: var(--transition);
  min-height: 46px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
  
a.link-block i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: var(--border-radius-sm);
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 14px;
}

a.link-block:hover,
a.link-block:focus {
  background-color: #edf5fb;
  border-color: #b8d6ea;
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

a.link-block:hover i,
a.link-block:focus i {
  background: #d8ebf7;
  color: var(--primary-dark);
}

.githublink {
  color:#666;
}
.githublink i {
  color:#01579B;
}

.cv-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto 30px;
  padding: 18px;
  background: var(--bg-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  align-items: flex-start;
}

.cv-sidebar {
  flex: 0 1 260px;
  padding: 20px;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.cv-content {
  flex: 1 1 680px;
  padding: 0 0 0 6px;
  background: transparent;
  border-radius: 0;
}
.cv-content section{
  margin-bottom:20px;
}
.profile-pic {
  width: 100%;
  max-width: 200px;
  border-radius: 4px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.profile-links a{
  margin-top: 0;
}

.link-block {
  text-decoration: none;
}

.link-block:hover {
  text-decoration: none;
}

@media (max-width: 768px) {
  .cv-container {
    flex-direction: column;
    padding: 14px;
  }
  .cv-sidebar {
    width: 100%;
    padding: 18px;
  }

  .cv-content {
    width: 100%;
    padding: 0;
  }
}

/* =============================================
   v1.1 — Sticky Navbar with scroll effect
   ============================================= */
.custom-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: var(--transition);
  background-color: var(--bg-white) !important;
  border-bottom: 1px solid transparent;
}

.custom-navbar.navbar-scrolled {
  box-shadow: var(--shadow);
  border-bottom-color: #e8ecf0;
}

/* Active nav link underline animation */
.navbar-default .navbar-nav > li > a {
  position: relative;
}
.navbar-default .navbar-nav > li > a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  right: 50%;
  height: 2px;
  background-color: var(--primary);
  transition: left 0.25s ease, right 0.25s ease;
  border-radius: 2px;
}
.navbar-default .navbar-nav > li > a:hover::after,
.navbar-default .navbar-nav > li.active > a::after {
  left: 15px;
  right: 15px;
}
.navbar-nav > li.active > a {
  background-color: transparent !important;
  color: var(--primary) !important;
  font-weight: 600;
}
.navbar-nav > li > a:hover {
  background-color: transparent !important;
  color: var(--primary) !important;
}

/* =============================================
   v1.1 — Scroll-reveal animations
   ============================================= */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   v1.1 — Homepage: Stats bar
   ============================================= */
.stats-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 28px 0 20px;
}

.stat-card {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 16px 28px;
  text-align: center;
  min-width: 120px;
  flex: 1 1 120px;
  max-width: 160px;
  border-top: 3px solid var(--primary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0;
}

/* =============================================
   v1.1 — Homepage: CTA Buttons
   ============================================= */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 12px;
}

.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: var(--border-radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  transition: var(--transition);
  border: 2px solid var(--primary);
}
.btn-primary-custom:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline-custom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--primary) !important;
  padding: 10px 22px;
  border-radius: var(--border-radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  transition: var(--transition);
  border: 2px solid var(--primary);
}
.btn-outline-custom:hover {
  background: var(--primary);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

@media (max-width: 576px) {
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary-custom,
  .btn-outline-custom {
    justify-content: center;
  }
  .stat-card {
    max-width: 100%;
  }
}

/* =============================================
   v1.1 — Modern dark footer
   ============================================= */
.footer-v11 {
  background: #1a2535;
  color: #b0bec5;
  padding: 48px 0 0;
  margin-top: 40px;
  font-size: 15px;
}

.footer-v11 .footer-brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.footer-v11 .footer-tagline {
  font-size: 13px;
  color: #78909c;
  margin-bottom: 20px;
  line-height: 1.6;
}

.footer-v11 h6 {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-v11 a {
  color: #90a4ae;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  margin-bottom: 8px;
}

.footer-v11 a:hover {
  color: #fff;
}

.footer-v11 .footer-social {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}

.footer-v11 .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  color: #90a4ae;
  font-size: 16px;
  margin-bottom: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.footer-v11 .footer-social a:hover {
  background: var(--primary);
  color: #fff;
}

.footer-v11 .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 32px;
  padding: 16px 0;
  font-size: 13px;
  color: #546e7a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-v11 .footer-theme-toggle {
  width: 32px;
  height: 32px;
  border-color: rgba(255,255,255,0.18);
  color: #90a4ae;
}

.footer-v11 .footer-theme-toggle:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.36);
}

.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 40px;
}

@media (max-width: 768px) {
  .footer-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .footer-cols {
    grid-template-columns: 1fr;
  }
  .footer-v11 .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* =============================================
   v1.1 — Back-to-top button
   ============================================= */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-size: 18px;
  line-height: 42px;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
}
#back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: #fff;
}

/* =============================================
   v1.2 - Readability, homepage, and responsive polish
   ============================================= */
a:focus-visible,
button:focus-visible,
label:focus-visible {
  outline: 3px solid #d79235;
  outline-offset: 3px;
}

.section-title {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 40px;
}

.section-header {
  background-color: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-left: 1px solid var(--border-soft);
  padding: 12px 14px;
  border-radius: var(--border-radius);
}

.section-header-title {
  display: inline-flex;
  align-items: center;
  flex: 1 1 240px;
  gap: 9px;
  line-height: 1.35;
  min-width: 0;
}

.section-header-icon {
  color: var(--primary);
  flex: 0 0 auto;
  text-align: center;
  width: 1.15em;
}

.collaboration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 28px;
}

.collaboration-card {
  background: var(--bg-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.collaboration-meta {
  color: var(--secondary);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.collaboration-card h3 {
  color: #20394d;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 9px;
}

.collaboration-card p {
  color: #4d6375;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 13px;
}

.collaboration-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.collaboration-tags span {
  background: #e7f1ee;
  border-radius: var(--border-radius-sm);
  color: #245d4e;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}

.card-supervision,
.education-card,
.experience-card,
.skill-block,
.language-item,
.awards-grid article {
  background-color: var(--bg-white);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.card-supervision {
  border-left: 1px solid var(--border-soft);
}

.div-justify,
.div-justify-pub,
.publication-entry,
.service-list li,
.experience-card p {
  text-align: left;
}

#publications .div-justify-pub {
  border-top: 1px solid var(--border-soft);
  counter-increment: publication-entry -1;
  line-height: 1.72;
  margin: 0;
  padding: 14px 0 16px 45px;
  position: relative;
  text-align: justify;
  text-justify: inter-word;
}

#publications .panel-body {
  counter-reset: publication-entry var(--publication-start, 1);
}

#publications .div-justify-pub:first-child {
  border-top: 0;
  padding-top: 0;
}

#publications .div-justify-pub:last-child {
  padding-bottom: 0;
}

#publications .div-justify-pub::before {
  color: #01579B;
  content: "[" counter(publication-entry, decimal-leading-zero) "]";
  display: block;
  font-size: 16px;
  font-weight: 700;
  left: 0;
  line-height: 1;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  white-space: nowrap;
}

#publications .div-justify-pub > i.fa-caret-right {
  display: none;
}

.home-page {
  padding: 30px 0 10px;
}

.home-container {
  max-width: 1080px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 54px;
  align-items: center;
  min-height: calc(100vh - 190px);
  padding: 48px 0 42px;
}

.hero-kicker {
  color: var(--secondary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-copy h1 {
  color: #183044;
  font-size: 52px;
  line-height: 1.04;
  font-weight: 700;
  margin: 0 0 18px;
}

.hero-lede {
  max-width: 680px;
  color: #344b5e;
  font-size: 22px;
  line-height: 1.55;
  margin-bottom: 22px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  background: #e7f1ee;
  color: #245d4e;
  font-size: 14px;
  font-weight: 700;
}

.hero-current {
  display: grid;
  gap: 4px;
  max-width: 640px;
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.hero-current span,
.hero-profile-note span,
.project-preview-list article span {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-current strong {
  color: #243d52;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
}

.home-hero .cta-buttons {
  justify-content: flex-start;
  margin-top: 26px;
}

.hero-profile-panel {
  justify-self: end;
  width: 100%;
  max-width: 370px;
}

.hero-portrait {
  margin: 0;
  justify-self: end;
}

.hero-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-soft);
  box-shadow: none;
  background-color: var(--bg-white);
}

.hero-profile-note {
  margin-top: 18px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
}

.hero-profile-note strong {
  display: block;
  margin-top: 5px;
  color: #243d52;
  font-size: 16px;
  line-height: 1.45;
}

.home-summary {
  max-width: 820px;
  margin: 0 auto 30px;
  color: #344b5e;
  font-size: 18px;
  line-height: 1.75;
}

.home-summary p {
  margin-bottom: 16px;
}

.home-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  margin: 0 0 44px;
  padding: 24px;
  background: var(--bg-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.home-overview p {
  color: #4d6375;
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
}

.home-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 46px;
}

.home-highlights div {
  background: var(--bg-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
  padding: 16px;
  min-height: 104px;
  box-shadow: var(--shadow-sm);
}

.home-highlights strong {
  display: block;
  color: var(--primary);
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.home-highlights span {
  display: block;
  color: #4d6375;
  font-size: 14px;
  line-height: 1.4;
}

.home-sections {
  margin-bottom: 28px;
}

.home-section-heading {
  color: #20394d;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 18px;
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.agenda-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.focus-list article {
  background: var(--bg-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
  padding: 18px;
  min-height: 210px;
  box-shadow: var(--shadow-sm);
}

.focus-list i {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 14px;
}

.focus-list h3 {
  color: #20394d;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 10px;
}

.focus-list p {
  color: #4d6375;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.project-preview {
  margin: 34px 0 18px;
}

.project-preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
}

.project-preview-heading .home-section-heading {
  margin-bottom: 0;
}

.project-preview-heading a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.project-preview-heading a:hover,
.project-preview-heading a:focus {
  color: var(--primary-light);
  text-decoration: none;
}

.project-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.case-study-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-preview-list article {
  background: var(--bg-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.project-preview-list article h3 {
  color: #20394d;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  margin: 8px 0 10px;
}

.project-preview-list article p {
  color: #4d6375;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.research-output-section {
  margin: 30px 0 18px;
}

.research-output-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 14px;
}

.research-output-heading .home-section-heading {
  margin-bottom: 0;
}

.research-output-heading a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.research-output-heading a:hover,
.research-output-heading a:focus {
  color: var(--primary-light);
  text-decoration: none;
}

.research-output-list {
  background: var(--bg-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.research-output-list a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--border-soft);
  color: #20394d;
  padding: 14px 16px;
  text-decoration: none;
}

.research-output-list a:first-child {
  border-top: 0;
}

.research-output-list a:hover,
.research-output-list a:focus {
  background: #f3f8fc;
  color: var(--primary);
  text-decoration: none;
}

.research-output-year {
  color: var(--secondary);
  font-size: 14px;
  font-weight: 700;
}

.research-output-list strong {
  font-size: 15px;
  line-height: 1.45;
}

.research-output-link {
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.home-social {
  text-align: center;
  margin: 34px 0 10px;
}

.stat-card {
  border-top: 1px solid var(--border-soft);
}

.btn-primary-custom,
.btn-outline-custom {
  min-height: 42px;
}

.btn-primary-custom {
  color: #fbfcfe !important;
}

.btn-primary-custom:hover,
.btn-outline-custom:hover {
  color: #fbfcfe !important;
}

@media (max-width: 991px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 28px;
    padding-top: 32px;
  }

  .hero-portrait {
    justify-self: start;
    max-width: 300px;
  }

  .hero-profile-panel {
    justify-self: start;
    max-width: 300px;
  }

  .focus-list,
  .home-overview,
  .collaboration-grid,
  .project-preview-list {
    grid-template-columns: 1fr;
  }

  .case-study-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .focus-list article {
    min-height: 0;
  }
}

@media (max-width: 767px) {
  body {
    border-top-width: 2px;
  }

  .navbar-brand.custom-brand {
    max-width: calc(100vw - 92px);
    padding-right: 0;
  }

  .navbar-brand.custom-brand .brand-name {
    display: inline-block;
    font-size: 13px;
    max-width: calc(100vw - 150px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
  }

  .home-page {
    padding-top: 18px;
  }

  .section-header {
    align-items: flex-start;
    gap: 8px;
  }

  .badge-primary {
    margin-left: 0;
  }

  .hero-profile-panel {
    justify-self: center;
    max-width: 300px;
  }

  .hero-portrait {
    justify-self: center;
    margin: 0 auto;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-lede {
    font-size: 18px;
  }

  .home-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-preview-heading,
  .research-output-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .research-output-list a {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .research-output-link {
    justify-self: start;
  }

  .case-study-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .home-highlights {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   v1.3 — Hero portrait decoration
   ============================================= */
/* =============================================
   v1.3 — Focus area cards hover
   ============================================= */
.focus-list article {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.focus-list article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow), inset 0 3px 0 0 var(--primary);
}

/* =============================================
   v1.3 — Theme toggle button
   ============================================= */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
  font-size: 15px;
  vertical-align: middle;
  margin-top: 0;
}

.btn-theme-toggle:hover {
  background: var(--surface-soft);
  color: var(--primary);
  border-color: var(--primary);
}

@media (max-width: 767px) {
  .btn-theme-toggle {
    margin: 0;
  }
}

/* =============================================
   v1.4 - Cross-page typography scale
   ============================================= */
#publications .panel-body,
#services .panel-body,
#projects .panel-body {
  font-size: var(--font-size-content);
  line-height: var(--line-height-content);
}

#publications .div-justify-pub,
#services .div-justify-pub,
#projects .div-justify-pub,
#services .service-list li,
#services .supervision-entry p,
#services .supervision-topic {
  font-size: var(--font-size-content);
  line-height: var(--line-height-content);
}

#publications .div-justify-pub::before {
  font-size: var(--font-size-content);
}

#services .supervision-meta {
  font-size: var(--font-size-compact);
  line-height: var(--line-height-card);
}

#services .teaching-card h3,
#projects .collaboration-card h3,
#projects .project-preview-list article h3 {
  font-size: 18px;
  line-height: 1.3;
}

#services .teaching-card p,
#projects .collaboration-card p,
#projects .project-preview-list article p {
  font-size: var(--font-size-card);
  line-height: var(--line-height-card);
}

#resumes .education-card,
#resumes .experience-card,
#resumes .awards-grid article {
  line-height: var(--line-height-card);
}

#resumes .edu-header h4,
#resumes .experience-header h4,
#resumes .skill-block h5,
#resumes .language-item h5 {
  font-size: 17px;
  line-height: 1.35;
}

#resumes .education-card p,
#resumes .education-card em,
#resumes .experience-card p,
#resumes .awards-grid p {
  font-size: var(--font-size-compact);
  line-height: var(--line-height-card);
}

#resumes .edu-note,
#resumes .skill-tag,
#resumes .tag,
#resumes .badge,
#resumes .badge-fluent,
#resumes .badge-native {
  font-size: var(--font-size-compact);
  line-height: var(--line-height-meta);
}

#resumes .edu-meta,
#resumes .experience-meta,
#resumes .profile-contact,
#resumes .profile-social,
#resumes a.link-block {
  font-size: var(--font-size-meta);
  line-height: var(--line-height-meta);
}

/* =============================================
   v1.3 — Dark mode (JS class: html.dark-mode)
   System preference detected in anti-FOUC
   inline script; manual toggle via JS.
   ============================================= */
html.dark-mode {
  --primary:       #4fc3f7;
  --primary-light: #81d4fa;
  --primary-dark:  #0288d1;
  --accent:        #4dd0e1;
  --secondary:     #4db6ac;
  --warm:          #ffb74d;
  --text-dark:     #d9e4f0;
  --text-muted:    #8ba8c0;
  --bg-light:      #141d2e;
  --bg-white:      #19243a;
  --surface-soft:  #1e2b40;
  --border-soft:   #2a3b52;
  --shadow-sm:     0 2px 6px rgba(0,0,0,0.4);
  --shadow:        0 4px 14px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 28px rgba(0,0,0,0.6);
  background-color: #0f1722;
  color: var(--text-dark);
  border-top-color: var(--primary);
}

html.dark-mode body {
  background-color: #0f1722;
  color: var(--text-dark);
}

/* Navbar */
html.dark-mode .custom-navbar,
html.dark-mode .navbar-default                            { background-color: #19243a !important; border-color: var(--border-soft) !important; }
html.dark-mode .custom-navbar.navbar-scrolled             { box-shadow: var(--shadow); border-bottom-color: var(--border-soft) !important; }
html.dark-mode .navbar-default .navbar-brand,
html.dark-mode .navbar-default .navbar-nav > li > a      { color: var(--text-muted) !important; }
html.dark-mode .navbar-default .navbar-nav > li > a:hover,
html.dark-mode .navbar-nav > li.active > a                { color: var(--primary) !important; }
html.dark-mode .navbar-default .navbar-toggle .icon-bar   { background-color: var(--text-muted); }
html.dark-mode .navbar-default .navbar-collapse           { border-color: var(--border-soft) !important; }
html.dark-mode .btn-theme-toggle                          { border-color: var(--border-soft); color: var(--text-muted); }
html.dark-mode .btn-theme-toggle:hover                    { background: var(--surface-soft); color: var(--primary); border-color: var(--primary); }

/* Bootstrap panels */
html.dark-mode .panel-default                             { background-color: var(--bg-white); border-color: var(--border-soft); }
html.dark-mode .panel-body                                { background-color: var(--bg-white); color: var(--text-dark); }
html.dark-mode .panel-default h4,
html.dark-mode .panel-default h5                         { color: var(--text-dark); }
html.dark-mode .panel-default h4 a,
html.dark-mode .panel-default h5 a                       { color: var(--primary); }

/* Links */
html.dark-mode .container a                               { color: var(--primary); }
html.dark-mode .container a:hover                         { color: var(--primary-light); }

/* Hero */
html.dark-mode .hero-copy h1                              { color: var(--text-dark); }
html.dark-mode .hero-lede                                 { color: #b0c4d8; }
html.dark-mode .hero-tags span                            { background: #1a2d3e; color: var(--secondary); }
html.dark-mode .hero-current                              { background: var(--bg-white); border-color: var(--border-soft); }
html.dark-mode .hero-current strong                       { color: var(--text-dark); }
html.dark-mode .hero-profile-note                         { background: var(--surface-soft); border-color: var(--border-soft); }
html.dark-mode .hero-profile-note strong                  { color: var(--text-dark); }

/* Home sections */
html.dark-mode .home-summary,
html.dark-mode .home-summary p                            { color: #b0c4d8; }
html.dark-mode .home-overview                             { background: var(--bg-white); border-color: var(--border-soft); }
html.dark-mode .home-overview p                           { color: var(--text-muted); }
html.dark-mode .home-highlights div                       { background: var(--bg-white); border-color: var(--border-soft); }
html.dark-mode .home-highlights span                      { color: var(--text-muted); }
html.dark-mode .home-section-heading                      { color: var(--text-dark); }
html.dark-mode .focus-list article                        { background: var(--bg-white); border-color: var(--border-soft); }
html.dark-mode .focus-list h3                             { color: var(--text-dark); }
html.dark-mode .focus-list p                              { color: var(--text-muted); }
html.dark-mode .collaboration-card                       { background: var(--bg-white); border-color: var(--border-soft); }
html.dark-mode .collaboration-card h3                    { color: var(--text-dark); }
html.dark-mode .collaboration-card p                     { color: var(--text-muted); }
html.dark-mode .collaboration-tags span                  { background: #1a2d3e; color: var(--primary); }
html.dark-mode .project-preview-heading a                 { color: var(--primary); }
html.dark-mode .project-preview-list article              { background: var(--bg-white); border-color: var(--border-soft); }
html.dark-mode .project-preview-list article h3           { color: var(--text-dark); }
html.dark-mode .project-preview-list article p            { color: var(--text-muted); }
html.dark-mode .research-output-heading a                 { color: var(--primary); }
html.dark-mode .research-output-list                      { background: var(--bg-white); border-color: var(--border-soft); }
html.dark-mode .research-output-list a                    { color: var(--text-dark); border-color: var(--border-soft); }
html.dark-mode .research-output-list a:hover,
html.dark-mode .research-output-list a:focus              { background: var(--surface-soft); color: var(--primary); }
html.dark-mode .research-output-list strong               { color: var(--text-dark); }
html.dark-mode .research-output-year                      { color: var(--secondary); }
html.dark-mode .research-output-link                      { color: var(--primary); }

/* Cards */
html.dark-mode .education-card,
html.dark-mode .experience-card,
html.dark-mode .skill-block,
html.dark-mode .language-item,
html.dark-mode .teaching-card,
html.dark-mode .supervision-entry,
html.dark-mode .awards-grid article                      { background: var(--bg-white); border-color: var(--border-soft); color: var(--text-dark); }
html.dark-mode .teaching-icon                            { background: #1a2d3e; border-color: var(--border-soft); color: var(--primary); }
html.dark-mode .teaching-card h3                         { color: var(--text-dark); }
html.dark-mode .teaching-card p                          { color: var(--text-muted); }
html.dark-mode .education-card em,
html.dark-mode .edu-note                                 { color: var(--text-muted); }
html.dark-mode .edu-meta                                 { color: var(--text-muted); }
html.dark-mode .meta-right                               { color: var(--text-muted); }
html.dark-mode .experience-card p                        { color: var(--text-muted); }
html.dark-mode .supervision-entry p                      { color: var(--text-muted); }
html.dark-mode .supervision-topic                        { color: var(--text-muted); }
html.dark-mode .supervision-label                        { color: var(--text-dark); }
html.dark-mode .supervision-value                        { color: #b0c4d8; }
html.dark-mode .supervision-value em,
html.dark-mode .supervision-value .student-name          { color: var(--text-dark); }
html.dark-mode .supervision-value a.student-name:hover,
html.dark-mode .supervision-value a.student-name:focus   { color: var(--primary); }
html.dark-mode .email-icon                               { color: var(--primary); }
html.dark-mode .email-icon:hover                         { color: var(--primary-light); }
html.dark-mode .awards-grid p                            { color: var(--text-muted); }
html.dark-mode .awards-grid h1                           { color: var(--primary); }

/* Section headers */
html.dark-mode .section-header                           { background-color: var(--surface-soft); border-color: var(--border-soft); color: var(--text-dark); }
html.dark-mode .section-subtitle                         { color: var(--text-dark); }
html.dark-mode .service-subtitle                         { color: var(--text-dark); }

/* Badges */
html.dark-mode .badge-fluent                             { background: #1a2d3e; color: var(--primary); }
html.dark-mode .badge-native                             { background: #0f2a1e; color: #4caf50; }
html.dark-mode .badge-primary                            { background-color: var(--primary-dark); color: #fff; }

/* Tags */
html.dark-mode .tag,
html.dark-mode .skill-tag                                { background: #1a2d3e; color: var(--primary); }
html.dark-mode .interest-tags .tag:hover                 { background: #1f3550; }

/* CV/resume */
html.dark-mode .profile-left                             { background: var(--bg-white); box-shadow: var(--shadow-sm); }
html.dark-mode .cv-container                             { background: var(--bg-white); border-color: var(--border-soft); }
html.dark-mode .cv-sidebar                               { background: transparent; border-color: transparent; }
html.dark-mode .cv-content                               { background: transparent; }
html.dark-mode .profile-name                             { color: var(--text-dark); }
html.dark-mode a.link-block,
html.dark-mode .link-block                               { background: var(--surface-soft); color: var(--text-dark); }
html.dark-mode a.link-block:hover,
html.dark-mode .link-block:hover                         { background: #263549; color: var(--primary); }

/* Buttons */
html.dark-mode .btn-outline-custom                       { border-color: var(--primary); color: var(--primary) !important; }
html.dark-mode .btn-outline-custom:hover                 { background: var(--primary); border-color: var(--primary); color: #0f1722 !important; }
html.dark-mode .btn-primary-custom                       { background: var(--primary); border-color: var(--primary); color: #0f1722 !important; }
html.dark-mode .btn-primary-custom:hover                 { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff !important; }

/* Misc */
html.dark-mode #back-to-top                              { background: var(--primary); color: #0f1722; }
html.dark-mode #back-to-top:hover                        { background: var(--primary-dark); color: #fff; }
html.dark-mode .hero-portrait::after                     { background: var(--surface-soft); border-color: var(--border-soft); }
html.dark-mode hr                                        { border-color: var(--border-soft); }
html.dark-mode .text-muted                               { color: var(--text-muted); }
html.dark-mode .profile-contact a,
html.dark-mode .profile-social a                         { color: var(--text-muted); }
html.dark-mode .profile-contact a:hover,
html.dark-mode .profile-social a:hover                   { color: var(--primary); }
html.dark-mode .pub-entry a,
html.dark-mode .div-justify-pub a                        { color: var(--primary); }
html.dark-mode .pub-entry a:hover,
html.dark-mode .div-justify-pub a:hover                  { color: var(--primary-light); }
html.dark-mode #publications .div-justify-pub::before    { color: var(--primary); }
